]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Fix three configure tests for Xcode 12 1100/head
authorGreg Hudson <ghudson@mit.edu>
Fri, 31 Jul 2020 22:35:15 +0000 (18:35 -0400)
committerGreg Hudson <ghudson@mit.edu>
Tue, 4 Aug 2020 18:41:16 +0000 (14:41 -0400)
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
src/configure.ac

index 54005fafe316a9ce5d5d37456df74ab6e6c4df73..6b80ee94ff8334fc71cd2207b164f8654f38ddca 100644 (file)
@@ -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.h>], [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 <unistd.h>
+void foo1() __attribute__((constructor));
 void foo1() { unlink("conftest.1"); }
 void foo2() __attribute__((destructor));
 void foo2() { unlink("conftest.2"); }
index 3a1dbbbb113317fae58ebd3dfa12ead8dcc29c49..49814922f5c8a7c41764b4356793a01e7d426917 100644 (file)
@@ -759,6 +759,7 @@ AC_CACHE_CHECK([for in6addr_any definition in library],
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <netdb.h>
+#include <stdio.h>
 ],[
   struct sockaddr_in6 in;
   in.sin6_addr = in6addr_any;