]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix compile when the compiler does not support the noreturn
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Jul 2024 07:55:31 +0000 (09:55 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Jul 2024 07:55:31 +0000 (09:55 +0200)
  attribute.

configure
configure.ac
doc/Changelog

index 9998b36e493a1259af4b093377ffad7f35ad06d9..6a4066771ebb14fc53da1441e59c17176c8792de 100755 (executable)
--- a/configure
+++ b/configure
@@ -7023,6 +7023,10 @@ printf "%s\n" "#define HAVE_ATTR_NORETURN 1" >>confdefs.h
 
 printf "%s\n" "#define ATTR_NORETURN __attribute__((__noreturn__))" >>confdefs.h
 
+else
+
+printf "%s\n" "#define ATTR_NORETURN /**/" >>confdefs.h
+
 fi
 
 
index 6adbe0e595956b9c2d6a8e348bb6b60f3c50cee4..977b91a24e8ce962f898e7b51c1dba4e42df9c07 100644 (file)
@@ -360,6 +360,8 @@ AC_MSG_RESULT($ac_cv_c_noreturn_attribute)
 if test $ac_cv_c_noreturn_attribute = yes; then
   AC_DEFINE(HAVE_ATTR_NORETURN, 1, [Whether the C compiler accepts the "noreturn" attribute])
   AC_DEFINE(ATTR_NORETURN, [__attribute__((__noreturn__))], [apply the noreturn attribute to a function that exits the program])
+else
+  AC_DEFINE(ATTR_NORETURN,[], [apply the noreturn attribute to a function that exits the program])
 fi
 ])dnl End of CHECK_NORETURN_ATTRIBUTE
 
index 221e8d02da279dc84013cf21f2dbd45d2d12018c..e9b2e7a40f079af2000d74ab94392920753c378e 100644 (file)
@@ -5,6 +5,8 @@
        - Merge #1110: Make fallthrough explicit for libworker.c.
        - For #1110: Test for fallthrough attribute in configure and add
          fallthrough attribute annotations.
+       - Fix compile when the compiler does not support the noreturn
+         attribute.
 
 19 July 2024: Wouter
        - Add dnstap-sample-rate that logs only 1/N messages, for high volume