Skip to content

Commit

Permalink
Do not use pthread_setname_np on < 10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Apr 22, 2024
1 parent e9366b0 commit f315e1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ixwebsocket/IXSetThreadName.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#include <pthread_np.h>
#endif

#ifdef __APPLE__
#include <AvailabilityMacros.h>
#endif

// Windows
#ifdef _WIN32
#include <windows.h>
Expand Down Expand Up @@ -58,7 +62,7 @@ namespace ix

void setThreadName(const std::string& name)
{
#if defined(__APPLE__)
#if defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)
//
// Apple reserves 16 bytes for its thread names
// Notice that the Apple version of pthread_setname_np
Expand Down

0 comments on commit f315e1f

Please sign in to comment.