]> The Tcpdump Group git mirrors - libpcap/commitdiff
Fix check for BPF on AIX.
authorGuy Harris <[email protected]>
Fri, 31 Aug 2018 19:10:01 +0000 (12:10 -0700)
committerGuy Harris <[email protected]>
Fri, 31 Aug 2018 19:10:01 +0000 (12:10 -0700)
net/bpf.h requires that sys/time.h be included on AIX; do so when
testing whether it defines BIOCSETIF.

CMakeLists.txt
configure
configure.ac

index ea17ad4954596647c775124d0eac292a7aba5b96..63a8e49983f8e68ab46820e7e2db88641bff56d2 100644 (file)
@@ -931,13 +931,16 @@ else()
             # as it's a Linux, it should use packet sockets,
             # instead.
             #
-            #
             # We need:
             #
             #  sys/types.h, because FreeBSD 10's net/bpf.h
             #  requires that various BSD-style integer types
             #  be defined;
             #
+            #  sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
+            #  doesn't include it but does use struct timeval
+            #  in ioctl definitions;
+            #
             #  sys/ioctl.h and, if we have it, sys/ioccom.h,
             #  because net/bpf.h defines ioctls;
             #
@@ -952,9 +955,9 @@ else()
             # of those headers itself.
             #
             if(HAVE_SYS_IOCCOM_H)
-                check_symbol_exists(BIOCSETIF "sys/types.h;sys/ioctl.h;sys/socket.h;sys/ioccom.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF)
+                check_symbol_exists(BIOCSETIF "sys/types.h;sys/time.h;sys/ioctl.h;sys/socket.h;sys/ioccom.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF)
             else(HAVE_SYS_IOCCOM_H)
-                check_symbol_exists(BIOCSETIF "sys/types.h;sys/ioctl.h;sys/socket.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF)
+                check_symbol_exists(BIOCSETIF "sys/types.h;sys/time.h;sys/ioctl.h;sys/socket.h;net/bpf.h;net/if.h" BPF_H_DEFINES_BIOCSETIF)
             endif(HAVE_SYS_IOCCOM_H)
         endif(HAVE_NET_BPF_H)
         check_include_file(net/pfilt.h HAVE_NET_PFILT_H)
index 49eccf4ca4897f0d29411f13f1e343628d87ef7c..309c0beadcf86d99f2a97a064c4ee4bcbfb84052 100755 (executable)
--- a/configure
+++ b/configure
@@ -5942,6 +5942,10 @@ done
                #  requires that various BSD-style integer types
                #  be defined;
                #
+               #  sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
+               #  doesn't include it but does use struct timeval
+               #  in ioctl definitions;
+               #
                #  sys/ioctl.h and, if we have it, sys/ioccom.h,
                #  because net/bpf.h defines ioctls;
                #
@@ -5964,6 +5968,7 @@ else
 /* end confdefs.h.  */
 
 #include <sys/types.h>
+#include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #ifdef HAVE_SYS_IOCCOM_H
index 8e376da56d712f66440624a9a84c3af66ebea07c..bb5abd6e5ae7eee7d21cf9aa43cab53a19f4dbb1 100644 (file)
@@ -536,6 +536,10 @@ else
                #  requires that various BSD-style integer types
                #  be defined;
                #
+               #  sys/time.h, because AIX 5.2 and 5.3's net/bpf.h
+               #  doesn't include it but does use struct timeval
+               #  in ioctl definitions;
+               #
                #  sys/ioctl.h and, if we have it, sys/ioccom.h,
                #  because net/bpf.h defines ioctls;
                #
@@ -554,6 +558,7 @@ else
                        AC_TRY_COMPILE(
 [
 #include <sys/types.h>
+#include <sys/time.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
 #ifdef HAVE_SYS_IOCCOM_H