]> The Tcpdump Group git mirrors - libpcap/commitdiff
This might be what we want.
authorGuy Harris <[email protected]>
Wed, 8 Nov 2017 08:16:13 +0000 (00:16 -0800)
committerGuy Harris <[email protected]>
Wed, 8 Nov 2017 08:16:13 +0000 (00:16 -0800)
Some headers might be available on both Windows and UN*X; try using them
on both platforms.  Use <windows.h> on Windows, as we're making some
Win32 calls there.

tests/findalldevstest.c

index 72b59669aef231212be8adacd3b364b845cebb9e..76316aa6d638f60ae06392309b86f379387d0e49 100644 (file)
@@ -5,13 +5,13 @@
 #include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <netdb.h>
 #ifdef _WIN32
-  #include <winsock2.h>
+  #include <windows.h>
 #else
-  #include <sys/socket.h>
-  #include <netinet/in.h>
-  #include <arpa/inet.h>
-  #include <netdb.h>
   #include <pwd.h>
   #include <unistd.h>
 #endif