diff --git a/libc/utils/gpu/loader/amdgpu/Loader.cpp b/libc/utils/gpu/loader/amdgpu/Loader.cpp --- a/libc/utils/gpu/loader/amdgpu/Loader.cpp +++ b/libc/utils/gpu/loader/amdgpu/Loader.cpp @@ -15,8 +15,18 @@ #include "Loader.h" -#include -#include +#if defined(__has_include) +#if __has_include("hsa/hsa.h") +#include "hsa/hsa.h" +#include "hsa/hsa_ext_amd.h" +#elif __has_include("hsa.h") +#include "hsa.h" +#include "hsa_ext_amd.h" +#endif +#else +#include "hsa/hsa.h" +#include "hsa/hsa_ext_amd.h" +#endif #include #include