aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-09-07 18:00:57 -0700
committerGuy Harris <guy@alum.mit.edu>2017-09-07 18:00:57 -0700
commit7986077bff29661d8e7b5caedd7c31c5cf5e01a7 (patch)
tree4d7557fed65d58ef4c3c8432614471aeaf117a2c
parent1835a02fb564d73ba8ed38546fe1d12dff39a615 (diff)
This version of pcap_lookupnet() requires UN*X.
Build it only on UN*X; build the generic version of pcap_lookupdev(), however, even on Windows if we don't have packet.dll.
-rw-r--r--pcap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pcap.c b/pcap.c
index 176762ad..e9084113 100644
--- 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"