From 58d8f2f6524d5658ef87e3ee7267f9fbdf8d0560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Mayer?= Date: Mon, 7 Mar 2005 10:19:33 +0000 Subject: [PATCH] - 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 --- capture.h | 6 ++---- gtk/capture_info_dlg.c | 2 +- gtk/main.c | 10 +++++----- gtk/summary_dlg.c | 1 + summary.h | 1 + tethereal.c | 5 ++--- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/capture.h b/capture.h index 8c5f017394..76e60ecf9f 100644 --- 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 */ 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 #include -#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 -#endif - #include #include @@ -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 #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 #include "capture.h" #include "main.h" #endif diff --git a/summary.h b/summary.h index 6327b20517..d3e2af1d75 100644 --- a/summary.h +++ b/summary.h @@ -26,6 +26,7 @@ #define __SUMMARY_H__ #ifdef HAVE_LIBPCAP +#include #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 #include #include "register.h" @@ -101,6 +98,8 @@ #include #ifdef HAVE_LIBPCAP +#include +#include "pcap-util.h" #include #include #ifdef _WIN32