diff --git a/runtime/src/kmp_wrapper_getpid.h b/openmp/runtime/src/kmp_wrapper_getpid.h --- a/runtime/src/kmp_wrapper_getpid.h +++ b/openmp/runtime/src/kmp_wrapper_getpid.h @@ -22,7 +22,12 @@ #include #if KMP_OS_DARWIN // OS X +#include +#if __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_12 +#define __kmp_gettid() pthread_mach_thread_np(pthread_self()) +#else #define __kmp_gettid() syscall(SYS_thread_selfid) +#endif #elif KMP_OS_FREEBSD #include #define __kmp_gettid() pthread_getthreadid_np()