From: W.C.A. Wijngaards Date: Fri, 17 Apr 2026 15:13:14 +0000 (+0200) Subject: - Fix pthread_setname detection to fail on warnings. X-Git-Url: http://git.ipfire.org/index.cgi?a=commitdiff_plain;h=52fc5ee374af22eba5145af0cbdb68ccd2aefa1d;p=thirdparty%2Funbound.git - Fix pthread_setname detection to fail on warnings. --- diff --git a/configure b/configure index c7fc98c4e..703faec77 100755 --- a/configure +++ b/configure @@ -19092,6 +19092,8 @@ then : fi + BAKCFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" # MacOS only has 1 argument, the name. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_setname_np has only 1 argument" >&5 printf %s "checking whether pthread_setname_np has only 1 argument... " >&6; } @@ -19240,6 +19242,7 @@ printf "%s\n" "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS="$BAKCFLAGS" fi # check solaris thread library diff --git a/configure.ac b/configure.ac index 265fcbdac..4874c57c4 100644 --- a/configure.ac +++ b/configure.ac @@ -736,6 +736,8 @@ if test x_$ub_have_pthreads != x_no; then # Some OSes have the extra non-portable functions in a specific # header file. AC_CHECK_HEADERS([pthread_np.h],,, [AC_INCLUDES_DEFAULT]) + BAKCFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Werror" # MacOS only has 1 argument, the name. AC_MSG_CHECKING([whether pthread_setname_np has only 1 argument]) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT @@ -796,6 +798,7 @@ if test x_$ub_have_pthreads != x_no; then ],[ AC_MSG_RESULT(no) ]) + CFLAGS="$BAKCFLAGS" fi # check solaris thread library diff --git a/doc/Changelog b/doc/Changelog index b1c4e4f54..1c689ea63 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -17,6 +17,7 @@ - Fix subnet store of servfail to not leak memory. - Update generated man pages. - Update generated configure, with autoconf. + - Fix pthread_setname detection to fail on warnings. 17 April 2026: Yorgos - Merge #1400: Support pthread_setname_np. Adds support for