diff --git a/amd_gpu/gpu.h b/amd_gpu/gpu.h index f7e1140..230650e 100644 --- a/amd_gpu/gpu.h +++ b/amd_gpu/gpu.h @@ -1,6 +1,11 @@ #pragma once +#if defined(__APPLE__) || defined(__MACOSX) +#include +#else #include +#endif + #include #define ERR_SUCCESS (0) diff --git a/minethd.cpp b/minethd.cpp index 728abbb..967041d 100644 --- a/minethd.cpp +++ b/minethd.cpp @@ -48,7 +48,7 @@ void thd_setaffinity(std::thread::native_handle_type h, uint64_t cpu_id) { #if defined(__APPLE__) thread_port_t mach_thread; - thread_affinity_policy_data_t policy = { cpu_id }; + thread_affinity_policy_data_t policy = { (integer_t)cpu_id }; mach_thread = pthread_mach_thread_np(h); thread_policy_set(mach_thread, THREAD_AFFINITY_POLICY, (thread_policy_t)&policy, 1); #else