diff options
author | Jörg Mayer <jmayer@loplof.de> | 2005-03-07 10:19:33 +0000 |
---|---|---|
committer | Jörg Mayer <jmayer@loplof.de> | 2005-03-07 10:19:33 +0000 |
commit | 58d8f2f6524d5658ef87e3ee7267f9fbdf8d0560 (patch) | |
tree | ffbd3755463443abb63104664cdd1ddf643ebed2 | |
parent | 8de6e67f085b1e222c206a5dd391e7b5c88a8d3a (diff) | |
download | wireshark-58d8f2f6524d5658ef87e3ee7267f9fbdf8d0560.tar.gz |
- pcap.h needs to be included before capture.h
- 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.
svn path=/trunk/; revision=13648
-rw-r--r-- | capture.h | 6 | ||||
-rw-r--r-- | gtk/capture_info_dlg.c | 2 | ||||
-rw-r--r-- | gtk/main.c | 10 | ||||
-rw-r--r-- | gtk/summary_dlg.c | 1 | ||||
-rw-r--r-- | summary.h | 1 | ||||
-rw-r--r-- | tethereal.c | 5 |
6 files changed, 12 insertions, 13 deletions
@@ -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 */ diff --git a/gtk/capture_info_dlg.c b/gtk/capture_info_dlg.c index b9d98901c7..bbc6661333 100644 --- a/gtk/capture_info_dlg.c +++ b/gtk/capture_info_dlg.c @@ -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" diff --git a/gtk/main.c b/gtk/main.c index 6c070f99ec..4ecf447da6 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -30,10 +30,6 @@ # include "config.h" #endif -#ifdef HAVE_LIBPCAP -#include <pcap.h> -#endif - #include <gtk/gtk.h> #include <string.h> @@ -91,14 +87,18 @@ #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 diff --git a/gtk/summary_dlg.c b/gtk/summary_dlg.c index eafb72e7db..03a8309c67 100644 --- a/gtk/summary_dlg.c +++ b/gtk/summary_dlg.c @@ -36,6 +36,7 @@ #include "globals.h" #include "file.h" #ifdef HAVE_LIBPCAP +#include <pcap.h> #include "capture.h" #include "main.h" #endif @@ -26,6 +26,7 @@ #define __SUMMARY_H__ #ifdef HAVE_LIBPCAP +#include <pcap.h> #include "capture.h" #endif diff --git a/tethereal.c b/tethereal.c index 3d05d1a386..ef6e5cd2af 100644 --- a/tethereal.c +++ b/tethereal.c @@ -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" @@ -101,6 +98,8 @@ #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 |