mirror of
https://github.com/nmap/nmap.git
synced 2025-12-22 15:39:03 +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:
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());
|
||||
|
||||
Reference in New Issue
Block a user