summaryrefslogtreecommitdiff
path: root/airpcap.h
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2008-10-24 00:42:09 +0000
committerBill Meier <wmeier@newsguy.com>2008-10-24 00:42:09 +0000
commit8afa208ffbb9ecc1b6195aef20d269e2fefd88d3 (patch)
tree9dba16a45db59ebe1b10965d38f3844a27cc911f /airpcap.h
parentede39bfe1fed5b6ea7949c610cffe34315266803 (diff)
downloadwireshark-8afa208ffbb9ecc1b6195aef20d269e2fefd88d3.tar.gz
Windows build: #include winsock2.h only when needed.
#include winsock2.h pulls in about 90 distinct .h files and about 140 total .h files. Currently winsock2.h is (mostly unnecessarily) included for each dissector via packet.h/wtap.h. This patch removes #include winsock2.h from wtap.h and then includes winsock2.h (or windows.h) in the few specific places required. With this patch, my Windows Wireshark build takes about 30% less time. svn path=/trunk/; revision=26535
Diffstat (limited to 'airpcap.h')
-rw-r--r--airpcap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/airpcap.h b/airpcap.h
index 639a930a70..7bc4a88209 100644
--- a/airpcap.h
+++ b/airpcap.h
@@ -29,6 +29,10 @@
#pragma warning( disable : 4996)
#endif
+#ifdef HAVE_WINSOCK2_H
+#include <winsock2.h>
+#endif
+
#ifdef __cplusplus
extern "C" {
#endif