From bb0ac26ce1bc8966d87e5db2d9a9675bd939b6af Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Thu, 21 Jan 2016 02:33:45 -0800 Subject: Explicit check if pthread_setname_np accepts only one parameter --- common/threads.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common/threads.c') diff --git a/common/threads.c b/common/threads.c index 1f6f2223..127b9083 100644 --- a/common/threads.c +++ b/common/threads.c @@ -497,10 +497,10 @@ extern inline void alcall_once(alonce_flag *once, void (*callback)(void)); void althrd_setname(althrd_t thr, const char *name) { #if defined(HAVE_PTHREAD_SETNAME_NP) -#if defined(__APPLE__) +#if defined(PTHREAD_SETNAME_NP_ONE_PARAM) if(althrd_equal(thr, althrd_current())) pthread_setname_np(name); -#elif defined(__GNUC__) +#else pthread_setname_np(thr, name); #endif #elif defined(HAVE_PTHREAD_SET_NAME_NP) -- cgit v1.2.3