From a037a7694b841f7cab6eb47bd877c6710a2de8fb Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Fri, 31 Jul 2020 18:35:15 -0400 Subject: [PATCH] Fix three configure tests for Xcode 12 Xcode 12 will change its clang to have -Werror=implicit-function-declaration by default. Fix three autoconf tests which generate this warning due to missing include declarations. Reported by Misty De Meo. ticket: 8928 --- src/aclocal.m4 | 7 ++++--- src/configure.ac | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 54005fafe3..6b80ee94ff 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -833,7 +833,7 @@ if test -n "$tcl_conf" ; then done LIBS="$old_LIBS `eval echo x $TCL_LIB_SPEC $TCL_LIBS | sed 's/^x//'`" LDFLAGS="$old_LDFLAGS $TCL_LD_FLAGS" - AC_TRY_LINK( , [Tcl_CreateInterp ();], + AC_TRY_LINK([#include ], [Tcl_CreateInterp ();], tcl_ok_conf=$file tcl_vers_maj=$TCL_MAJOR_VERSION tcl_vers_min=$TCL_MINOR_VERSION @@ -1601,8 +1601,9 @@ if test -r conftest.1 && test -r conftest.2 ; then true ; else fi a=no b=no -# blindly assume we have 'unlink'... -AC_TRY_RUN([void foo1() __attribute__((constructor)); +# blindly assume we have 'unlink' and unistd.h. +AC_TRY_RUN([#include +void foo1() __attribute__((constructor)); void foo1() { unlink("conftest.1"); } void foo2() __attribute__((destructor)); void foo2() { unlink("conftest.2"); } diff --git a/src/configure.ac b/src/configure.ac index 3a1dbbbb11..49814922f5 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -759,6 +759,7 @@ AC_CACHE_CHECK([for in6addr_any definition in library], #include #include #include +#include ],[ struct sockaddr_in6 in; in.sin6_addr = in6addr_any; -- 2.47.2