From 11fd7ffb21085611817db3c8570cccd60b4ea271 Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 12 Sep 2022 18:41:28 +0100 Subject: [PATCH] acinclude.m4: fix configure tests broken with Clang 16 (implicit function declarations) Clang 16 will make -Wimplicit-int and -Wimplicit-function-declaration errors by default which can, in addition to other things, lead to some configure tests silently failing/returning the wrong result. 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 --- acinclude.m4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/acinclude.m4 b/acinclude.m4 index f514b8e..b3c3fa0 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -904,7 +904,8 @@ AC_DEFUN([AC_W3M_SIGSETJMP], [AC_SUBST(HAVE_SIGSETJMP) AC_MSG_CHECKING(for sigsetjmp) AC_TRY_COMPILE( -[#include ], +[#include + #include ], [ jmp_buf env; if (sigsetjmp(env, 1) != 0) { exit(0); } siglongjmp(env, 1);], [have_sigsetjmp="yes"; AC_DEFINE(HAVE_SIGSETJMP)],