From 9cbacefbb03bd7758d35d52a0a3106069db308ea Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Sat, 21 Sep 2019 20:05:35 +0000 Subject: build: restore BSD thread names after 9f461b85bfa3 On FreeBSD non-POSIX threading functions are in a separate header. DragonFly and OpenBSD adopted FreeBSD header and extensions. ../test.c:3:3: error: implicit declaration of function 'pthread_set_name_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration] { pthread_set_name_np(pthread_self(), "ducks"); return 0; } ^ ../osdep/threads.c:47:5: error: implicit declaration of function 'pthread_set_name_np' is invalid in C99 [-Werror,-Wimplicit-function-declaration] pthread_set_name_np(pthread_self(), tname); ^ Signed-off-by: Jan Beich --- wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'wscript') diff --git a/wscript b/wscript index 4e41c5c821..eb68ab1f5d 100644 --- a/wscript +++ b/wscript @@ -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']), }, { -- cgit v1.2.3