From c21d62d4e6732b6aefcf28d813f44973e0b2d584 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 22 Oct 2011 01:09:30 +0000 Subject: [PATCH] Revert r26741. This makes Nmap assume that pcap sockets are selectable on Solaris again. I had originally tested this on Solaris x86, and couldn't get a scan to complete witho ut this change. But it was reported that it fails on Solaris SPARC (scans take a long time, indicating that pcap calls are blocking longer than their timeout). I just tested it again on Solaris x86, and now I can't get a scan to complete wi th r26741. So reverting. --- libnetutil/netutil.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index 1342d8475..0092a8757 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -849,7 +849,7 @@ void set_ttl(int sd, int ttl) { /* Returns whether the system supports pcap_get_selectable_fd() properly */ int pcap_selectable_fd_valid() { -#if defined(WIN32) || defined(MACOSX) || defined(SOLARIS) || (defined(FREEBSD) && (__FreeBSD_version < 500000)) +#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000)) return 0; #else return 1; @@ -863,7 +863,7 @@ 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(SOLARIS) || (defined(FREEBSD) && (__FreeBSD_version < 500000)) +#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000)) return -1; #else assert(pcap_selectable_fd_valid());