aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2015-11-20 15:24:47 +0100
committerLukas Larsson <[email protected]>2016-03-18 11:14:55 +0100
commit0988d9aa2089fdcab9e8261c8953d2ba1867c28e (patch)
tree59ff7da33d612798ab1054881c467349243600c6
parentcee5b753e8dbd294b2677f684c404d16dcfcd643 (diff)
downloadotp-0988d9aa2089fdcab9e8261c8953d2ba1867c28e.tar.gz
otp-0988d9aa2089fdcab9e8261c8953d2ba1867c28e.tar.bz2
otp-0988d9aa2089fdcab9e8261c8953d2ba1867c28e.zip
erts: Fix pthread_setname_np warning on osx
-rw-r--r--erts/include/internal/ethread.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/include/internal/ethread.h b/erts/include/internal/ethread.h
index e5c5cdfa33..b23644d361 100644
--- a/erts/include/internal/ethread.h
+++ b/erts/include/internal/ethread.h
@@ -112,6 +112,10 @@ int ethr_assert_failed(const char *file, int line, const char *func, char *a);
#error "_GNU_SOURCE not defined. Please, compile all files with -D_GNU_SOURCE."
#endif
+#ifdef ETHR_HAVE_PTHREAD_SETNAME_NP_1
+#define _DARWIN_C_SOURCE
+#endif
+
#if defined(ETHR_NEED_NPTL_PTHREAD_H)
#include <nptl/pthread.h>
#elif defined(ETHR_HAVE_MIT_PTHREAD_H)