summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-11-04 01:53:32 +0000
committerSam James <sam@gentoo.org>2022-11-05 06:22:05 +0000
commit69aa78133144fe7276dd4fe7f2eb7ff64f0a8337 (patch)
treecd9382f9a35376d545cb9b8a8d0d93d12c8d348f
parent0eb070e437ae2ac0e25e4795d20df145d7bbfbee (diff)
downloadraptor-69aa78133144fe7276dd4fe7f2eb7ff64f0a8337.tar.gz
configure.ac: fix -Wimplicit-function-declaration in HAVE___FUNCTION__ test (Clang 16)
Clang 16 will make -Wimplicit-function-declaration errors by default. ``` error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] error: call to undeclared library function 'printf' with type 'int (const char *, ...)'; ISO C99 and later do not support implicit function declarations [-Werror,-Wimplicit-function-declaration] ``` For more information, see LWN.net [0] or LLVM's Discourse [1], gentoo-dev@ [2], or the (new) c-std-porting mailing list [3]. [0] https://lwn.net/Articles/913505/ [1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 [2] https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240 [3] hosted at lists.linux.dev. Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r--configure.ac3
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index fae94798..84fc6bbc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -335,7 +335,8 @@ AC_C_BIGENDIAN
AC_C_INLINE
AC_MSG_CHECKING(whether __FUNCTION__ is available)
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { printf(__FUNCTION__); }])],
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([#include <stdio.h>
+int main() { printf(__FUNCTION__); }])],
[AC_DEFINE([HAVE___FUNCTION__], [1], [Is __FUNCTION__ available])
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])