From fd2ed2546c588e6a2313a0387ff881e2ae1a9b04 Mon Sep 17 00:00:00 2001 From: Mike Jerris Date: Wed, 3 Mar 2021 10:02:29 -0700 Subject: [PATCH] [build] fix configure checks for ipv6 on latest osx --- libs/apr/build/apr_common.m4 | 3 +++ libs/apr/build/apr_network.m4 | 18 ++++++++++++++++++ libs/apr/configure.ac | 3 +++ 3 files changed, 24 insertions(+) diff --git a/libs/apr/build/apr_common.m4 b/libs/apr/build/apr_common.m4 index 1f79f7acd0..e8e9f51f08 100644 --- a/libs/apr/build/apr_common.m4 +++ b/libs/apr/build/apr_common.m4 @@ -519,6 +519,9 @@ AC_TRY_RUN([ #include #include #include +#ifdef HAVE_STDLIB_H +#include +#endif int main(void) { char buf[1024]; diff --git a/libs/apr/build/apr_network.m4 b/libs/apr/build/apr_network.m4 index d8b1bcad27..df582960ac 100644 --- a/libs/apr/build/apr_network.m4 +++ b/libs/apr/build/apr_network.m4 @@ -40,6 +40,9 @@ AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO],[ #ifdef HAVE_SYS_SOCKET_H #include #endif +#ifdef HAVE_STDLIB_H +#include +#endif int main(void) { struct addrinfo hints, *ai; @@ -134,6 +137,12 @@ AC_DEFUN([APR_CHECK_WORKING_GETNAMEINFO],[ #ifdef HAVE_NETINET_IN_H #include #endif +#ifdef HAVE_ARPA_INET_H +#include +#endif +#ifdef HAVE_STDLIB_H +#include +#endif int main(void) { struct sockaddr_in sa; @@ -177,6 +186,9 @@ AC_DEFUN([APR_CHECK_NEGATIVE_EAI],[ #ifdef HAVE_NETDB_H #include #endif +#ifdef HAVE_STDLIB_H +#include +#endif int main(void) { if (EAI_ADDRFAMILY < 0) { @@ -282,6 +294,9 @@ AC_DEFUN([APR_CHECK_TCP_NODELAY_INHERITED],[ #ifndef HAVE_SOCKLEN_T typedef int socklen_t; #endif +#ifdef HAVE_STDLIB_H +#include +#endif int main(void) { int listen_s, connected_s, client_s; int listen_port, rc; @@ -453,6 +468,9 @@ typedef int socklen_t; #ifdef HAVE_FCNTL_H #include #endif +#ifdef HAVE_STDLIB_H +#include +#endif int main(void) { int listen_s, connected_s, client_s; int listen_port, rc; diff --git a/libs/apr/configure.ac b/libs/apr/configure.ac index fa5796ecca..2b8f551880 100644 --- a/libs/apr/configure.ac +++ b/libs/apr/configure.ac @@ -1552,6 +1552,7 @@ AC_TRY_RUN([ #include #include #include +#include main() { struct rlimit limit; @@ -1580,6 +1581,7 @@ AC_TRY_RUN([ #include #include #include +#include main() { sem_t *psem; @@ -1634,6 +1636,7 @@ if test "$threads" = "1"; then AC_TRY_RUN([ #include #include +#include int main() { pthread_mutex_t mutex;