Use a bunch of #includes only when needed. (2nd try; hat tip to Guy).
authorBill Meier <wmeier@newsguy.com>
Mon, 9 Sep 2013 14:26:41 +0000 (14:26 -0000)
committerBill Meier <wmeier@newsguy.com>
Mon, 9 Sep 2013 14:26:41 +0000 (14:26 -0000)
svn path=/trunk/; revision=51868

capture-pcap-util-unix.c

index 31def40f786d776d8b3d3009f38f810a57586f12..f0b6825ce0ac1bfa1d2f9b7facf2a2f5b518e904 100644 (file)
@@ -28,6 +28,8 @@
 
 #ifdef HAVE_LIBPCAP
 
+#ifndef HAVE_PCAP_FINDALLDEVS
+
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
@@ -56,8 +58,15 @@ struct rtentry;
 # include <sys/sockio.h>
 #endif
 
-#include "capture_ifinfo.h"
 #include "capture-pcap-util.h"
+
+#else
+
+#include <pcap.h>
+
+#endif  /* HAVE_PCAP_FINDALLDEVS */
+
+#include "capture_ifinfo.h"
 #include "capture-pcap-util-int.h"
 
 #ifndef HAVE_PCAP_FINDALLDEVS