[libc++abi] Fix broken check for _LIBCPP_HAS_THREAD_API_PTHREAD (#118999)
We were still using the old `defined(_LIBCPP_HAS_THREAD_API_PTHREAD)` check, which is always true.
This commit is contained in:
parent
1df28554bd
commit
b23fc2c5bf
@ -156,12 +156,12 @@ private:
|
||||
// PlatformGetThreadID
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if defined(__APPLE__) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
|
||||
#if defined(__APPLE__) && _LIBCPP_HAS_THREAD_API_PTHREAD
|
||||
uint32_t PlatformThreadID() {
|
||||
static_assert(sizeof(mach_port_t) == sizeof(uint32_t), "");
|
||||
return static_cast<uint32_t>(pthread_mach_thread_np(std::__libcpp_thread_get_current_id()));
|
||||
}
|
||||
#elif defined(SYS_gettid) && defined(_LIBCPP_HAS_THREAD_API_PTHREAD)
|
||||
#elif defined(SYS_gettid) && _LIBCPP_HAS_THREAD_API_PTHREAD
|
||||
uint32_t PlatformThreadID() {
|
||||
static_assert(sizeof(pid_t) == sizeof(uint32_t), "");
|
||||
return static_cast<uint32_t>(syscall(SYS_gettid));
|
||||
|
Loading…
x
Reference in New Issue
Block a user