diff options
Diffstat (limited to 'base')
-rw-r--r-- | base/logging.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/base/logging.cpp b/base/logging.cpp index 6357b4ba7..75078e50e 100644 --- a/base/logging.cpp +++ b/base/logging.cpp | |||
@@ -80,7 +80,9 @@ static thread_id GetThreadId() { | |||
80 | #if defined(__BIONIC__) | 80 | #if defined(__BIONIC__) |
81 | return gettid(); | 81 | return gettid(); |
82 | #elif defined(__APPLE__) | 82 | #elif defined(__APPLE__) |
83 | return syscall(SYS_thread_selfid); | 83 | uint64_t tid; |
84 | pthread_threadid_np(NULL, &tid); | ||
85 | return tid; | ||
84 | #elif defined(__linux__) | 86 | #elif defined(__linux__) |
85 | return syscall(__NR_gettid); | 87 | return syscall(__NR_gettid); |
86 | #elif defined(_WIN32) | 88 | #elif defined(_WIN32) |