Ticket #67212: pthread_threadid_np.patch
File pthread_threadid_np.patch, 698 bytes (added by ryandesign (Ryan Carsten Schmidt), 19 months ago) |
---|
-
include/spdlog/details/os-inl.h
old new 56 56 57 57 # elif defined(__sun) 58 58 # include <thread.h> // for thr_self 59 60 # elif defined(__APPLE__) 61 # include <AvailabilityMacros.h> // for MAC_OS_X_VERSION_MIN_REQUIRED 59 62 # endif 60 63 61 64 #endif // unix … … 351 354 return static_cast<size_t>(::getthrid()); 352 355 #elif defined(__sun) 353 356 return static_cast<size_t>(::thr_self()); 354 #elif __APPLE__357 #elif defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 355 358 uint64_t tid; 356 359 pthread_threadid_np(nullptr, &tid); 357 360 return static_cast<size_t>(tid);