]> granicus.if.org Git - php/commitdiff
net/if.h requires sys/socket.h on OpenBSD
authorDavid Carlier <devnexen@gmail.com>
Sat, 30 Dec 2017 09:44:53 +0000 (09:44 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 6 Jan 2018 20:42:27 +0000 (21:42 +0100)
This led to a detection failure of this particular header.

ext/standard/config.m4

index a4d6ccf1e6de5c599c38367b7ae51c7004cf64b2..a74df78a51e5c1420ea89a4a284c6c9359fe066c 100644 (file)
@@ -451,7 +451,14 @@ fi
 dnl
 dnl net_get_interfaces
 dnl
-AC_CHECK_HEADERS([net/if.h netdb.h])
+AC_CHECK_HEADERS([net/if.h],[], [],
+[
+  #ifdef HAVE_SYS_SOCKET_H
+  #include <sys/socket.h>
+  #endif
+  #include <net/if.h>
+])
+AC_CHECK_HEADERS([netdb.h])
 AC_MSG_CHECKING([for usable getifaddrs])
 AC_TRY_LINK([
   #include <sys/types.h>