summaryrefslogtreecommitdiff
path: root/build/apr_network.m4
diff options
context:
space:
mode:
Diffstat (limited to 'build/apr_network.m4')
-rw-r--r--build/apr_network.m420
1 files changed, 20 insertions, 0 deletions
diff --git a/build/apr_network.m4 b/build/apr_network.m4
index 2e446957e..ea5f37007 100644
--- a/build/apr_network.m4
+++ b/build/apr_network.m4
@@ -66,6 +66,12 @@ AC_DEFUN([APR_CHECK_WORKING_GETADDRINFO], [
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
int main(void) {
struct addrinfo hints, *ai;
@@ -400,9 +406,11 @@ AC_DEFUN([APR_CHECK_TCP_NODELAY_INHERITED], [
AC_CACHE_CHECK(if TCP_NODELAY setting is inherited from listening sockets, ac_cv_tcp_nodelay_inherited,[
AC_TRY_RUN( [
#include <stdio.h>
+#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
+#include <string.h>
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -752,6 +760,12 @@ AC_TRY_COMPILE([
#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
],[
inet_addr("127.0.0.1");
],[
@@ -772,6 +786,10 @@ fi
AC_DEFUN([APR_CHECK_INET_NETWORK], [
AC_CACHE_CHECK(for inet_network, ac_cv_func_inet_network,[
AC_TRY_COMPILE([
+#include <sys/socket.h>
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
#endif
@@ -958,7 +976,9 @@ AC_DEFUN([APR_CHECK_MCAST], [
AC_CACHE_CHECK([for struct ip_mreq], [apr_cv_struct_ipmreq], [
AC_TRY_COMPILE([
#include <sys/types.h>
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
], [
struct ip_mreq mip;
mip.imr_interface.s_addr = INADDR_ANY;