Skip to content

Commit f315e1f

Browse files
committed
Do not use pthread_setname_np on < 10.6
1 parent e9366b0 commit f315e1f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ixwebsocket/IXSetThreadName.cpp

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
#include <pthread_np.h>
1616
#endif
1717

18+
#ifdef __APPLE__
19+
#include <AvailabilityMacros.h>
20+
#endif
21+
1822
// Windows
1923
#ifdef _WIN32
2024
#include <windows.h>
@@ -58,7 +62,7 @@ namespace ix
5862

5963
void setThreadName(const std::string& name)
6064
{
61-
#if defined(__APPLE__)
65+
#if defined(__APPLE__) && (MAC_OS_X_VERSION_MIN_REQUIRED >= 1060)
6266
//
6367
// Apple reserves 16 bytes for its thread names
6468
// Notice that the Apple version of pthread_setname_np

0 commit comments

Comments
 (0)