Ticket #67212: pthread_threadid_np.patch

File pthread_threadid_np.patch, 698 bytes (added by ryandesign (Ryan Carsten Schmidt), 13 months ago)
  • include/spdlog/details/os-inl.h

    old new  
    5656
    5757#    elif defined(__sun)
    5858#        include <thread.h> // for thr_self
     59
     60#    elif defined(__APPLE__)
     61#        include <AvailabilityMacros.h> // for MAC_OS_X_VERSION_MIN_REQUIRED
    5962#    endif
    6063
    6164#endif // unix
     
    351354    return static_cast<size_t>(::getthrid());
    352355#elif defined(__sun)
    353356    return static_cast<size_t>(::thr_self());
    354 #elif __APPLE__
     357#elif defined(__APPLE__) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
    355358    uint64_t tid;
    356359    pthread_threadid_np(nullptr, &tid);
    357360    return static_cast<size_t>(tid);