summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--caputils/capture-pcap-util-unix.c12
-rw-r--r--caputils/capture-pcap-util.h12
-rw-r--r--caputils/capture_wpcap_packet.c12
-rw-r--r--extcap/androiddump.c12
-rw-r--r--ringbuffer.c12
-rw-r--r--trigcap.c13
-rw-r--r--ui/gtk/airpcap_dlg.c12
-rw-r--r--ui/qt/capture_filter_syntax_worker.cpp14
-rw-r--r--ui/qt/compiled_filter_output.cpp12
9 files changed, 111 insertions, 0 deletions
diff --git a/caputils/capture-pcap-util-unix.c b/caputils/capture-pcap-util-unix.c
index 362317e914..5d57a02797 100644
--- a/caputils/capture-pcap-util-unix.c
+++ b/caputils/capture-pcap-util-unix.c
@@ -26,6 +26,18 @@
#ifdef HAVE_LIBPCAP
+#ifdef HAVE_PCAP_REMOTE
+/*
+ * Force the WinPcap header files to define things required for remote
+ * capture. (Yes, this is q WinPcap bug; if your project has a public
+ * header file that checks or otherwise uses a #define that's defined
+ * by your project's configuration process, and don't ensure that
+ * it's always defined appropriately when that header file is included,
+ * before its first use, you have made a mistake.)
+ */
+#define HAVE_REMOTE
+#endif
+
#include <pcap.h>
#ifdef __APPLE__
diff --git a/caputils/capture-pcap-util.h b/caputils/capture-pcap-util.h
index a5c3825900..87a05e8283 100644
--- a/caputils/capture-pcap-util.h
+++ b/caputils/capture-pcap-util.h
@@ -29,6 +29,18 @@ extern "C" {
#ifdef HAVE_LIBPCAP
+#ifdef HAVE_PCAP_REMOTE
+/*
+ * Force the WinPcap header files to define things required for remote
+ * capture. (Yes, this is q WinPcap bug; if your project has a public
+ * header file that checks or otherwise uses a #define that's defined
+ * by your project's configuration process, and don't ensure that
+ * it's always defined appropriately when that header file is included,
+ * before its first use, you have made a mistake.)
+ */
+#define HAVE_REMOTE
+#endif
+
#include <pcap.h>
#include "capture_opts.h"
diff --git a/caputils/capture_wpcap_packet.c b/caputils/capture_wpcap_packet.c
index 5b3ffc479d..6d1b77cb11 100644
--- a/caputils/capture_wpcap_packet.c
+++ b/caputils/capture_wpcap_packet.c
@@ -30,6 +30,18 @@
#include <glib.h>
#include <gmodule.h>
+#ifdef HAVE_PCAP_REMOTE
+/*
+ * Force the WinPcap header files to define things required for remote
+ * capture. (Yes, this is q WinPcap bug; if your project has a public
+ * header file that checks or otherwise uses a #define that's defined
+ * by your project's configuration process, and don't ensure that
+ * it's always defined appropriately when that header file is included,
+ * before its first use, you have made a mistake.)
+ */
+#define HAVE_REMOTE
+#endif
+
#include <pcap.h>
/* XXX - yes, I know, I should move cppmagic.h to a generic location. */
diff --git a/extcap/androiddump.c b/extcap/androiddump.c
index d5a267e954..00cc0e03fb 100644
--- a/extcap/androiddump.c
+++ b/extcap/androiddump.c
@@ -65,6 +65,18 @@
#define PCAP_RECORD_HEADER_LENGTH 16
#ifdef ANDROIDDUMP_USE_LIBPCAP
+ #ifdef HAVE_PCAP_REMOTE
+ /*
+ * Force the WinPcap header files to define things required for remote
+ * capture. (Yes, this is q WinPcap bug; if your project has a public
+ * header file that checks or otherwise uses a #define that's defined
+ * by your project's configuration process, and don't ensure that
+ * it's always defined appropriately when that header file is included,
+ * before its first use, you have made a mistake.)
+ */
+ #define HAVE_REMOTE
+ #endif
+
#include <pcap.h>
#include <pcap-bpf.h>
#include <pcap/bluetooth.h>
diff --git a/ringbuffer.c b/ringbuffer.c
index 0ba365c25f..51a1a2ff6b 100644
--- a/ringbuffer.c
+++ b/ringbuffer.c
@@ -49,6 +49,18 @@
#include <time.h>
#include <errno.h>
+#ifdef HAVE_PCAP_REMOTE
+/*
+ * Force the WinPcap header files to define things required for remote
+ * capture. (Yes, this is q WinPcap bug; if your project has a public
+ * header file that checks or otherwise uses a #define that's defined
+ * by your project's configuration process, and don't ensure that
+ * it's always defined appropriately when that header file is included,
+ * before its first use, you have made a mistake.)
+ */
+#define HAVE_REMOTE
+#endif
+
#include <pcap.h>
#include <glib.h>
diff --git a/trigcap.c b/trigcap.c
index c0779584d6..3c14c6a37e 100644
--- a/trigcap.c
+++ b/trigcap.c
@@ -27,6 +27,19 @@
#include <signal.h>
#include <errno.h>
#include <getopt.h>
+
+#ifdef HAVE_PCAP_REMOTE
+/*
+ * Force the WinPcap header files to define things required for remote
+ * capture. (Yes, this is q WinPcap bug; if your project has a public
+ * header file that checks or otherwise uses a #define that's defined
+ * by your project's configuration process, and don't ensure that
+ * it's always defined appropriately when that header file is included,
+ * before its first use, you have made a mistake.)
+ */
+#define HAVE_REMOTE
+#endif
+
#include <pcap.h>
static int dumping;
diff --git a/ui/gtk/airpcap_dlg.c b/ui/gtk/airpcap_dlg.c
index b3660b387f..b02034c2db 100644
--- a/ui/gtk/airpcap_dlg.c
+++ b/ui/gtk/airpcap_dlg.c
@@ -35,6 +35,18 @@
#include <epan/prefs.h>
#include <epan/crypt/wep-wpadefs.h>
+#ifdef HAVE_PCAP_REMOTE
+/*
+ * Force the WinPcap header files to define things required for remote
+ * capture. (Yes, this is q WinPcap bug; if your project has a public
+ * header file that checks or otherwise uses a #define that's defined
+ * by your project's configuration process, and don't ensure that
+ * it's always defined appropriately when that header file is included,
+ * before its first use, you have made a mistake.)
+ */
+#define HAVE_REMOTE
+#endif
+
#include <pcap.h>
#include "ui/simple_dialog.h"
diff --git a/ui/qt/capture_filter_syntax_worker.cpp b/ui/qt/capture_filter_syntax_worker.cpp
index 9f6ae0cc1c..a296f89c51 100644
--- a/ui/qt/capture_filter_syntax_worker.cpp
+++ b/ui/qt/capture_filter_syntax_worker.cpp
@@ -23,7 +23,21 @@
#ifdef HAVE_LIBPCAP
#include <glib.h>
+
+#ifdef HAVE_PCAP_REMOTE
+/*
+ * Force the WinPcap header files to define things required for remote
+ * capture. (Yes, this is q WinPcap bug; if your project has a public
+ * header file that checks or otherwise uses a #define that's defined
+ * by your project's configuration process, and don't ensure that
+ * it's always defined appropriately when that header file is included,
+ * before its first use, you have made a mistake.)
+ */
+#define HAVE_REMOTE
+#endif
+
#include <pcap.h>
+
#include "capture_opts.h"
#include "ui/capture_globals.h"
#endif
diff --git a/ui/qt/compiled_filter_output.cpp b/ui/qt/compiled_filter_output.cpp
index 67c5f64daa..c78ab713ac 100644
--- a/ui/qt/compiled_filter_output.cpp
+++ b/ui/qt/compiled_filter_output.cpp
@@ -23,6 +23,18 @@
#include <ui_compiled_filter_output.h>
#include "compiled_filter_output.h"
+#ifdef HAVE_PCAP_REMOTE
+/*
+ * Force the WinPcap header files to define things required for remote
+ * capture. (Yes, this is q WinPcap bug; if your project has a public
+ * header file that checks or otherwise uses a #define that's defined
+ * by your project's configuration process, and don't ensure that
+ * it's always defined appropriately when that header file is included,
+ * before its first use, you have made a mistake.)
+ */
+#define HAVE_REMOTE
+#endif
+
#include <pcap.h>
#include "capture_opts.h"