aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]fad-win32.c3
-rw-r--r--pcap-int.h5
-rw-r--r--pcap-win32.c4
3 files changed, 10 insertions, 2 deletions
diff --git a/fad-win32.c b/fad-win32.c
index 4f36ad2b..7b050570 100644..100755
--- a/fad-win32.c
+++ b/fad-win32.c
@@ -35,9 +35,10 @@
#include "config.h"
#endif
+#define PCAP_DONT_INCLUDE_PCAP_BPF_H
#include <pcap.h>
-#include <pcap-int.h>
#include <Packet32.h>
+#include <pcap-int.h>
#include <errno.h>
diff --git a/pcap-int.h b/pcap-int.h
index 655c19d9..8abbf254 100644
--- a/pcap-int.h
+++ b/pcap-int.h
@@ -41,6 +41,11 @@ extern "C" {
#endif
#ifdef _WIN32
+/*
+ * Make sure Packet32.h doesn't define BPF structures that we've
+ * probably already defined as a result of including <pcap/pcap.h>.
+ */
+#define BPF_MAJOR_VERSION
#include <Packet32.h>
extern CRITICAL_SECTION g_PcapCompileCriticalSection;
#endif /* _WIN32 */
diff --git a/pcap-win32.c b/pcap-win32.c
index 63ba6302..ed754600 100644
--- a/pcap-win32.c
+++ b/pcap-win32.c
@@ -31,8 +31,10 @@
*
*/
-#include <pcap-int.h>
+#define PCAP_DONT_INCLUDE_PCAP_BPF_H
#include <Packet32.h>
+#include <pcap-int.h>
+#include <pcap/dlt.h>
#ifdef __MINGW32__
#ifdef __MINGW64__
#include <ntddndis.h>