[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:
AndreyChurbanov 2020-08-26 16:52:46 +03:00
parent 5078825aa9
commit 09af378f49
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@
#include <unistd.h>
#if KMP_OS_DARWIN
// OS X
#define __kmp_gettid() syscall(SYS_thread_selfid)
#define __kmp_gettid() pthread_mach_thread_np(pthread_self())
#elif KMP_OS_FREEBSD
#include <pthread_np.h>
#define __kmp_gettid() pthread_getthreadid_np()