--- wscript 2018-10-02 15:03:41.000000000 -0400 +++ wscript 2019-12-10 21:35:49.986840000 -0500 @@ -296,5 +296,5 @@ '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']), --- osdep/threads.c 2018-10-02 15:03:41.000000000 -0400 +++ osdep/threads.c 2019-12-10 21:49:16.311557000 -0500 @@ -21,4 +21,7 @@ #include "config.h" +#ifdef HAVE_BSD_THREAD_NAME +# include +#endif #include "threads.h"