Have a stub version of check_setif_failure(), declaring the first
argument as unused, on OSes other than macOS.
pcap_cleanup_live_common(p);
}
pcap_cleanup_live_common(p);
}
static int
check_setif_failure(pcap_t *p, int error)
{
static int
check_setif_failure(pcap_t *p, int error)
{
if (error == PCAP_ERROR_NO_SUCH_DEVICE) {
/*
* No such device exists.
*/
if (error == PCAP_ERROR_NO_SUCH_DEVICE) {
/*
* No such device exists.
*/
if (p->opt.rfmon && strncmp(p->opt.device, "wlt", 3) == 0) {
/*
* Monitor mode was requested, and we're trying
if (p->opt.rfmon && strncmp(p->opt.device, "wlt", 3) == 0) {
/*
* Monitor mode was requested, and we're trying
+#else
+static int
+check_setif_failure(pcap_t *p _U_, int error)
+{
+ /*
+ * Just return the error status; it's what we want, and, if it's
+ * PCAP_ERROR, the error string has been filled in.
+ */
+ return (error);
+}
+#endif
/*
* Default capture buffer size.
/*
* Default capture buffer size.