diff options
-rw-r--r-- | osdep/threads.c | 4 | ||||
-rw-r--r-- | wscript | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/osdep/threads.c b/osdep/threads.c index 5b164c5179..17642a3f89 100644 --- a/osdep/threads.c +++ b/osdep/threads.c @@ -24,6 +24,10 @@ #include "threads.h" #include "timer.h" +#if HAVE_BSD_THREAD_NAME +#include <pthread_np.h> +#endif + int mpthread_mutex_init_recursive(pthread_mutex_t *mutex) { pthread_mutexattr_t attr; @@ -308,7 +308,7 @@ iconv support use --disable-iconv.", 'name': 'bsd-thread-name', 'desc': 'BSD API for setting thread name', 'deps': '!(glibc-thread-name || osx-thread-name)', - 'func': check_statement('pthread.h', + 'func': check_statement(['pthread.h', 'pthread_np.h'], 'pthread_set_name_np(pthread_self(), "ducks")', use=['pthreads']), }, { |