From: Greg Hudson Date: Fri, 31 Jul 2020 22:35:15 +0000 (-0400) Subject: Fix three configure tests for Xcode 12 X-Git-Tag: krb5-1.19-beta1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1100%2Fhead;p=thirdparty%2Fkrb5.git 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 --- 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;