mirror of
https://github.com/nmap/nmap.git
synced 2026-08-04 06:40:48 +00:00
Don't duplicate #ifdefs.
This commit is contained in:
parent
f0f1419c5f
commit
e8c4db180d
1 changed files with 4 additions and 6 deletions
|
|
@ -873,12 +873,10 @@ int pcap_selectable_fd_valid() {
|
|||
results. If you just want to test whether the function is supported,
|
||||
use pcap_selectable_fd_valid() instead. */
|
||||
int my_pcap_get_selectable_fd(pcap_t *p) {
|
||||
#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000))
|
||||
return -1;
|
||||
#else
|
||||
assert(pcap_selectable_fd_valid());
|
||||
return pcap_get_selectable_fd(p);
|
||||
#endif
|
||||
if (pcap_selectable_fd_valid())
|
||||
return pcap_get_selectable_fd(p);
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue