aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/Name.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/thread/Name.hxx b/src/thread/Name.hxx
index a6faa0508..f86fc6e42 100644
--- a/src/thread/Name.hxx
+++ b/src/thread/Name.hxx
@@ -29,7 +29,11 @@ static inline void
SetThreadName(const char *name)
{
#ifdef HAVE_PTHREAD_SETNAME_NP
+#ifdef __APPLE__
+ pthread_setname_np(name);
+#else
pthread_setname_np(pthread_self(), name);
+#endif
#else
(void)name;
#endif