Sigh. Cast away a warning.

svn path=/trunk/; revision=37676
This commit is contained in:
Guy Harris 2011-06-15 21:22:30 +00:00
parent 2bada9a24f
commit 5ed5745664
1 changed files with 7 additions and 1 deletions

View File

@ -733,7 +733,13 @@ compile_capture_filter(const char *iface, pcap_t *pcap_h,
"Warning: Couldn't obtain netmask info (%s).", lookup_net_err_str);*/
netmask = 0;
}
if (pcap_compile(pcap_h, fcode, cfilter, 1, netmask) < 0)
/*
* Sigh. Older versions of libpcap don't properly declare the
* third argument to pcap_compile() as a const pointer. Cast
* away the warning.
*/
if (pcap_compile(pcap_h, fcode, (char *)cfilter, 1, netmask) < 0)
return FALSE;
return TRUE;
}