]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix configure test for noreturn attribute so it compiles without
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 6 Nov 2025 14:00:08 +0000 (15:00 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Thu, 6 Nov 2025 14:00:08 +0000 (15:00 +0100)
  warning.

configure.ac
doc/Changelog

index 09293706b3d07fd498523356b2c60ef620973928..541ac0bc45b80a6a53c5b6923d55ed58baf45cd5 100644 (file)
@@ -361,7 +361,14 @@ AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "noreturn" attribu
 AC_CACHE_VAL(ac_cv_c_noreturn_attribute,
 [ac_cv_c_noreturn_attribute=no
 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h>
-__attribute__((noreturn)) void f(int x) { printf("%d", x); }
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+__attribute__((noreturn)) void f(int x) { printf("%d", x); exit(1); }
 ]], [[
    f(1);
 ]])],[ac_cv_c_noreturn_attribute="yes"],[ac_cv_c_noreturn_attribute="no"])
index dfbd5ea99fa0198d302beca700c220fb269a40d7..f127530968de686d99354869b54e7beaa6d4a3cd 100644 (file)
@@ -1,5 +1,7 @@
 6 November 2025: Wouter
        - Fix add comment to worker_handle_request function that explain it.
+       - Fix configure test for noreturn attribute so it compiles without
+         warning.
 
 4 November 2025: Wouter
        - Fix dns64 log output to log the default instead of a null string.