From: W.C.A. Wijngaards Date: Tue, 23 Jul 2024 08:02:39 +0000 (+0200) Subject: - Fix to have empty definition when not supported for weak attribute. X-Git-Tag: release-1.21.0rc1~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=30da725e671911fc04d130c81cfdf3043befe8ed;p=thirdparty%2Funbound.git - Fix to have empty definition when not supported for weak attribute. --- diff --git a/configure b/configure index 6a4066771..daa37e504 100755 --- a/configure +++ b/configure @@ -6976,6 +6976,10 @@ printf "%s\n" "#define HAVE_ATTR_WEAK 1" >>confdefs.h printf "%s\n" "#define ATTR_WEAK __attribute__((weak))" >>confdefs.h +else + +printf "%s\n" "#define ATTR_WEAK /**/" >>confdefs.h + fi diff --git a/configure.ac b/configure.ac index 977b91a24..4d17fb8c1 100644 --- a/configure.ac +++ b/configure.ac @@ -339,6 +339,8 @@ AC_MSG_RESULT($ac_cv_c_weak_attribute) if test $ac_cv_c_weak_attribute = yes; then AC_DEFINE(HAVE_ATTR_WEAK, 1, [Whether the C compiler accepts the "weak" attribute]) AC_DEFINE(ATTR_WEAK, [__attribute__((weak))], [apply the weak attribute to a symbol]) +else + AC_DEFINE(ATTR_WEAK,[], [apply the weak attribute to a symbol]) fi ])dnl End of CHECK_WEAK_ATTRIBUTE diff --git a/doc/Changelog b/doc/Changelog index e9b2e7a40..45099106d 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -7,6 +7,7 @@ fallthrough attribute annotations. - Fix compile when the compiler does not support the noreturn attribute. + - Fix to have empty definition when not supported for weak attribute. 19 July 2024: Wouter - Add dnstap-sample-rate that logs only 1/N messages, for high volume