]> The Tcpdump Group git mirrors - libpcap/commitdiff
Make the PCAP_DONT_INCLUDE_PCAP_BPF_H stuff BPF-only.
authorGuy Harris <[email protected]>
Wed, 10 Apr 2013 23:13:33 +0000 (16:13 -0700)
committerGuy Harris <[email protected]>
Wed, 10 Apr 2013 23:13:33 +0000 (16:13 -0700)
We don't need it on Linux and, in fact, it doesn't work on Linux, as
Linux doesn't define "struct bpf_program", libpcap does.

tests/valgrindtest.c

index 9fd0a4e49d6c1de3ef4b7aa308cabd6fca6237c0..f74f8ea29c63699c92c82ba39228b3dd53dbf381 100644 (file)
@@ -52,13 +52,9 @@ static const char rcsid[] _U_ =
 #endif
 
 #if defined(USE_BPF)
+
 #include <sys/ioctl.h>
 #include <net/bpf.h>
-#elif defined(USE_SOCKET_FILTERS)
-#include <sys/socket.h>
-#include <linux/types.h>
-#include <linux/filter.h>
-#endif
 
 /*
  * Make "pcap.h" not include "pcap/bpf.h"; we are going to include the
@@ -68,6 +64,14 @@ static const char rcsid[] _U_ =
  */
 #define PCAP_DONT_INCLUDE_PCAP_BPF_H
 
+#elif defined(USE_SOCKET_FILTERS)
+
+#include <sys/socket.h>
+#include <linux/types.h>
+#include <linux/filter.h>
+
+#endif
+
 #include <pcap.h>
 #ifndef HAVE___ATTRIBUTE__
 #define __attribute__(x)