- pcap.h needs to be included before capture.h
authorjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 7 Mar 2005 10:19:33 +0000 (10:19 +0000)
committerjmayer <jmayer@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 7 Mar 2005 10:19:33 +0000 (10:19 +0000)
- As capture.h is empty without libpcap defined, only include it in that
  case and don't protect the file internally against libpcap any more.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@13648 f5534014-38df-0310-8fa8-9805f1628bb7

capture.h
gtk/capture_info_dlg.c
gtk/main.c
gtk/summary_dlg.c
summary.h
tethereal.c

index 8c5f017394d21174b87c41873c992faa518c9ec5..76e60ecf9f05ea3a60e645c9fe4cf78a19ec0c75 100644 (file)
--- a/capture.h
+++ b/capture.h
@@ -22,6 +22,8 @@
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
+/* This file should only be included if libpcap is present */
+
 #ifndef __CAPTURE_H__
 #define __CAPTURE_H__
 
@@ -29,8 +31,6 @@
  *  Capture related things.
  */
 
-#ifdef HAVE_LIBPCAP
-
 /** Name we give to the child process when doing a "-S" capture. */
 #define        CHILD_NAME      "ethereal-capture"
 
@@ -156,6 +156,4 @@ extern void capture_info_destroy(
 capture_info    *cinfo);
 
 
-#endif /* HAVE_LIBPCAP */
-
 #endif /* capture.h */
index b9d98901c79a0c13facd79fc661a9a05900e332a..bbc66613339422095345c80593d5123c9c59d81e 100644 (file)
@@ -37,7 +37,7 @@
 #include <time.h>
 
 #include <epan/packet.h>
-#include "../capture.h"
+#include "capture.h"
 #include "globals.h"
 #include "capture_ui_utils.h"
 #include "dlg_utils.h"
index 6c070f99ec66307104d365414cc75403c1cf30a0..4ecf447da6e737cd1be9bcdfb98cb9bfaa418d39 100644 (file)
 # include "config.h"
 #endif
 
-#ifdef HAVE_LIBPCAP
-#include <pcap.h>
-#endif
-
 #include <gtk/gtk.h>
 
 #include <string.h>
 #include "util.h"
 #include "clopts_common.h"
 #include "version_info.h"
-#include "capture.h"
 #include "merge.h"
+
 #ifdef HAVE_LIBPCAP
+#include <pcap.h>
 #include "pcap-util.h"
+#include "capture.h"
 #endif
+
 #ifdef _WIN32
 #include "capture-wpcap.h"
 #endif
+
 #if GTK_MAJOR_VERSION < 2 && GTK_MINOR_VERSION < 3
 #include "ethclist.h"
 #endif
index eafb72e7db01c32f7c53c61308ed8876d37332c9..03a8309c677015cc58fe23c37facd9382339f635 100644 (file)
@@ -36,6 +36,7 @@
 #include "globals.h"
 #include "file.h"
 #ifdef HAVE_LIBPCAP
+#include <pcap.h>
 #include "capture.h"
 #include "main.h"
 #endif
index 6327b2051715e370b876bdd2354530a0174a0b39..d3e2af1d750d52874bb304ab810bd5923c8b507e 100644 (file)
--- a/summary.h
+++ b/summary.h
@@ -26,6 +26,7 @@
 #define __SUMMARY_H__
 
 #ifdef HAVE_LIBPCAP
+#include <pcap.h>
 #include "capture.h"
 #endif
 
index 3d05d1a386a9b7ffa197c154409b32e21269438d..ef6e5cd2afa2f1ec3c72618c7d9877f503b173c1 100644 (file)
@@ -86,9 +86,6 @@
 #include "util.h"
 #include "clopts_common.h"
 #include "version_info.h"
-#ifdef HAVE_LIBPCAP
-#include "pcap-util.h"
-#endif
 #include <epan/conversation.h>
 #include <epan/plugins.h>
 #include "register.h"
 #include <epan/timestamp.h>
 
 #ifdef HAVE_LIBPCAP
+#include <pcap.h>
+#include "pcap-util.h"
 #include <wiretap/wtap-capture.h>
 #include <wiretap/libpcap.h>
 #ifdef _WIN32