[OpenMP] Fix build on macOS sdk 10.12 and newer
Patch by nihui (Ni Hui) Differential Revision: https://reviews.llvm.org/D76755
This commit is contained in:
parent
5078825aa9
commit
09af378f49
|
|
@ -22,7 +22,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#if KMP_OS_DARWIN
|
#if KMP_OS_DARWIN
|
||||||
// OS X
|
// OS X
|
||||||
#define __kmp_gettid() syscall(SYS_thread_selfid)
|
#define __kmp_gettid() pthread_mach_thread_np(pthread_self())
|
||||||
#elif KMP_OS_FREEBSD
|
#elif KMP_OS_FREEBSD
|
||||||
#include <pthread_np.h>
|
#include <pthread_np.h>
|
||||||
#define __kmp_gettid() pthread_getthreadid_np()
|
#define __kmp_gettid() pthread_getthreadid_np()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue