summaryrefslogtreecommitdiff
path: root/pcap.h
diff options
context:
space:
mode:
authorguy <guy>2002-08-02 03:44:19 +0000
committerguy <guy>2002-08-02 03:44:19 +0000
commit309e3868706ee5115eefbc2ddf7e35bb9651dad6 (patch)
tree16414555c0f45ccb091efad9f37de3a92804fc3d /pcap.h
parent3073e4c400921ff0f4521ab199bcb8c51a582cf3 (diff)
downloadlibpcap-309e3868706ee5115eefbc2ddf7e35bb9651dad6.tar.gz
Use <pcap-stdinc.h> only on Windows; on UNIX, selectively include, in
each source file, only the headers that file needs, and all the headers it needs in order to compile on various platforms and not to get any avoidable compiler warnings on those platforms (as well as any incomplete structure definitions needed to avoid those warnings). That also means that <pcap.h> doesn't include <pcap-stdinc.h> on UNIX; we don't want it to include <pcap-stdinc.h>, at least on UNIX, as doing so 1) would mean we'd have to install that, so that programs can build with libpcap and 2) would mean that programs including <pcap.h> would drag in a bunch of header files that they don't need. Put a newline at the end of "inet.c" - the Sun C compiler doesn't like it if the last line doesn't end with a newline.
Diffstat (limited to 'pcap.h')
-rw-r--r--pcap.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/pcap.h b/pcap.h
index c2855b06..8e8e6238 100644
--- a/pcap.h
+++ b/pcap.h
@@ -31,13 +31,18 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.36 2002-08-01 08:33:04 risso Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/pcap.h,v 1.37 2002-08-02 03:44:21 guy Exp $ (LBL)
*/
#ifndef lib_pcap_h
#define lib_pcap_h
+#ifdef WIN32
#include <pcap-stdinc.h>
+#else /* WIN32 */
+#include <sys/types.h>
+#include <sys/time.h>
+#endif /* WIN32 */
#include <net/bpf.h>