]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tcpdump.c
Not all Windows pcaps have pcap_wsockinit().
[tcpdump] / tcpdump.c
index ddd5551d2e4dac110dd8f6ae35060c58cf4e3d37..b325b28c116b45f05b8ce3e70574c9c8660fa27f 100644 (file)
--- a/tcpdump.c
+++ b/tcpdump.c
@@ -1346,10 +1346,13 @@ main(int argc, char **argv)
        else
                ndo->program_name = program_name = argv[0];
 
-#ifdef _WIN32
+#if defined(HAVE_PCAP_WSOCKINIT)
        if (pcap_wsockinit() != 0)
                error("Attempting to initialize Winsock failed");
-#endif /* _WIN32 */
+#elif defined(HAVE_WSOCKINIT)
+       if (wsockinit() != 0)
+               error("Attempting to initialize Winsock failed");
+#endif
 
        /*
         * On platforms where the CPU doesn't support unaligned loads,