]> The Tcpdump Group git mirrors - libpcap/commitdiff
Avoids a compiler warning in case _WINSOCKAPI_ was already defined (someone defined...
authorrisso <risso>
Thu, 25 Sep 2003 15:59:42 +0000 (15:59 +0000)
committerrisso <risso>
Thu, 25 Sep 2003 15:59:42 +0000 (15:59 +0000)
pcap-stdinc.h

index 17d4771806baed82e9672beab555295328199703..fa5ea26bb305365e590864cc6692e344407fc741 100644 (file)
 #define SIZEOF_SHORT 2
 #define SIZEOF_INT 4
 
-#define _WINSOCKAPI_
+/*
+ * Avoids a compiler warning in case this was already defined      
+ * (someone defined _WINSOCKAPI_ when including 'windows.h', in order
+ * to prevent it from including 'winsock.h')
+ */
+#ifdef _WINSOCKAPI_
+#undef _WINSOCKAPI_
+#endif
+#include <winsock2.h>
+
 #include <fcntl.h>
 
-#include <winsock2.h>
 #include "bittypes.h"
 #include <time.h>
 #include <io.h>