From 0988d9aa2089fdcab9e8261c8953d2ba1867c28e Mon Sep 17 00:00:00 2001 From: Lukas Larsson Date: Fri, 20 Nov 2015 15:24:47 +0100 Subject: erts: Fix pthread_setname_np warning on osx --- erts/include/internal/ethread.h | 4 ++++ 1 file changed, 4 insertions(+) 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 #elif defined(ETHR_HAVE_MIT_PTHREAD_H) -- cgit v1.2.3