mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 16:57:06 +00:00
Applied FreeBSD portability patch from Jay Fink (he found it in FreeBSD ports tree). The patch
marks pcap file descriptors as not select()able by Nmap for FreeBSD versions < 5 (__FreeBSD_version < 500000)
This commit is contained in:
parent
875dcddd2c
commit
93c4dec5d0
1 changed files with 2 additions and 2 deletions
4
tcpip.cc
4
tcpip.cc
|
|
@ -2410,7 +2410,7 @@ char *readip_pcap(pcap_t * pd, unsigned int *len, long to_usec,
|
|||
|
||||
// Returns whether the system supports pcap_get_selectable_fd() properly
|
||||
bool pcap_selectable_fd_valid() {
|
||||
#if defined(WIN32) || defined(MACOSX)
|
||||
#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000))
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
|
|
@ -2424,7 +2424,7 @@ bool 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)
|
||||
#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000))
|
||||
return -1;
|
||||
#else
|
||||
assert(pcap_selectable_fd_valid());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue