- 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
This commit is contained in:
Jörg Mayer 2005-03-07 10:19:33 +00:00
parent 8de6e67f08
commit 58d8f2f652
6 changed files with 12 additions and 13 deletions

View File

@ -22,6 +22,8 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 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__ #ifndef __CAPTURE_H__
#define __CAPTURE_H__ #define __CAPTURE_H__
@ -29,8 +31,6 @@
* Capture related things. * Capture related things.
*/ */
#ifdef HAVE_LIBPCAP
/** Name we give to the child process when doing a "-S" capture. */ /** Name we give to the child process when doing a "-S" capture. */
#define CHILD_NAME "ethereal-capture" #define CHILD_NAME "ethereal-capture"
@ -156,6 +156,4 @@ extern void capture_info_destroy(
capture_info *cinfo); capture_info *cinfo);
#endif /* HAVE_LIBPCAP */
#endif /* capture.h */ #endif /* capture.h */

View File

@ -37,7 +37,7 @@
#include <time.h> #include <time.h>
#include <epan/packet.h> #include <epan/packet.h>
#include "../capture.h" #include "capture.h"
#include "globals.h" #include "globals.h"
#include "capture_ui_utils.h" #include "capture_ui_utils.h"
#include "dlg_utils.h" #include "dlg_utils.h"

View File

@ -30,10 +30,6 @@
# include "config.h" # include "config.h"
#endif #endif
#ifdef HAVE_LIBPCAP
#include <pcap.h>
#endif
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <string.h> #include <string.h>
@ -91,14 +87,18 @@
#include "util.h" #include "util.h"
#include "clopts_common.h" #include "clopts_common.h"
#include "version_info.h" #include "version_info.h"
#include "capture.h"
#include "merge.h" #include "merge.h"
#ifdef HAVE_LIBPCAP #ifdef HAVE_LIBPCAP
#include <pcap.h>
#include "pcap-util.h" #include "pcap-util.h"
#include "capture.h"
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
#include "capture-wpcap.h" #include "capture-wpcap.h"
#endif #endif
#if GTK_MAJOR_VERSION < 2 && GTK_MINOR_VERSION < 3 #if GTK_MAJOR_VERSION < 2 && GTK_MINOR_VERSION < 3
#include "ethclist.h" #include "ethclist.h"
#endif #endif

View File

@ -36,6 +36,7 @@
#include "globals.h" #include "globals.h"
#include "file.h" #include "file.h"
#ifdef HAVE_LIBPCAP #ifdef HAVE_LIBPCAP
#include <pcap.h>
#include "capture.h" #include "capture.h"
#include "main.h" #include "main.h"
#endif #endif

View File

@ -26,6 +26,7 @@
#define __SUMMARY_H__ #define __SUMMARY_H__
#ifdef HAVE_LIBPCAP #ifdef HAVE_LIBPCAP
#include <pcap.h>
#include "capture.h" #include "capture.h"
#endif #endif

View File

@ -86,9 +86,6 @@
#include "util.h" #include "util.h"
#include "clopts_common.h" #include "clopts_common.h"
#include "version_info.h" #include "version_info.h"
#ifdef HAVE_LIBPCAP
#include "pcap-util.h"
#endif
#include <epan/conversation.h> #include <epan/conversation.h>
#include <epan/plugins.h> #include <epan/plugins.h>
#include "register.h" #include "register.h"
@ -101,6 +98,8 @@
#include <epan/timestamp.h> #include <epan/timestamp.h>
#ifdef HAVE_LIBPCAP #ifdef HAVE_LIBPCAP
#include <pcap.h>
#include "pcap-util.h"
#include <wiretap/wtap-capture.h> #include <wiretap/wtap-capture.h>
#include <wiretap/libpcap.h> #include <wiretap/libpcap.h>
#ifdef _WIN32 #ifdef _WIN32