]> The Tcpdump Group git mirrors - libpcap/commitdiff
This version of pcap_lookupnet() requires UN*X.
authorGuy Harris <[email protected]>
Fri, 8 Sep 2017 01:00:57 +0000 (18:00 -0700)
committerGuy Harris <[email protected]>
Fri, 8 Sep 2017 01:00:57 +0000 (18:00 -0700)
Build it only on UN*X; build the generic version of pcap_lookupdev(),
however, even on Windows if we don't have packet.dll.

pcap.c

diff --git a/pcap.c b/pcap.c
index 176762adf169f8a85b98b2eb207ab7e7d697c6fb..e9084113e197bd520d5b0c8f5d42e4f74c28dddd 100644 (file)
--- a/pcap.c
+++ b/pcap.c
@@ -1212,7 +1212,9 @@ pcap_lookupdev(errbuf)
        pcap_freealldevs(alldevs);
        return (ret);
 }
+#endif /* !defined(HAVE_PACKET32) && !defined(MSDOS) */
 
+#if !defined(_WIN32) && !defined(MSDOS)
 /*
  * We don't just fetch the entire list of devices, search for the
  * particular device, and use its first IPv4 address, as that's too
@@ -1317,7 +1319,7 @@ pcap_lookupnet(device, netp, maskp, errbuf)
        *netp &= *maskp;
        return (0);
 }
-#endif
+#endif /* !defined(_WIN32) && !defined(MSDOS) */
 
 #ifdef HAVE_REMOTE
 #include "pcap-rpcap.h"