Fix for SVN #26535 so that building Wireshark with VC6 doesn't fail.
[obnox/wireshark/wip.git] / capture_wpcap_packet.c
index 6729e0c8389bb563cb4bc6b3ea3b04d88ccc9307..5da76ea9c996eca8c63cf9f19fee9b7e41a4586e 100644 (file)
 
 #include <epan/value_string.h>
 
-#include <Packet32.h>
-#include <windows.h>
+#include <winsock2.h>    /* Needed here to force a definition of WINVER           */
+                         /* for some (all ?) Microsoft compilers newer than vc6.  */
+                         /* (If windows.h were used instead, there might be       */
+                         /*  issues re winsock.h included before winsock2.h )     */
 #include <windowsx.h>
 #include <Ntddndis.h>
 
@@ -91,6 +93,7 @@ struct sockaddr_storage {
 /* ... copied from RFC2553 */
 #endif /* WINVER */
 
+#include <Packet32.h>
 
 gboolean has_wpacket = FALSE;