summaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index 82dc201d3..40dc683ce 100644
--- a/src/config.h
+++ b/src/config.h
@@ -234,8 +234,14 @@ void setproctitle(const char *fmt, ...);
#include <pthread_np.h>
#define redis_set_thread_title(name) pthread_set_name_np(pthread_self(), name)
#else
+#if (defined __APPLE__ && defined(MAC_OS_X_VERSION_10_7))
+int pthread_setname_np(const char *name);
+#include <pthread.h>
+#define redis_set_thread_title(name) pthread_setname_np(name)
+#else
#define redis_set_thread_title(name)
#endif
#endif
+#endif
#endif