Date: Wed, 3 Jan 2007 17:25:26 +0100 (CET) From: Daniel Roethlisberger <daniel@roe.ch> To: FreeBSD-gnats-submit@FreeBSD.org Cc: daniel@roe.ch Subject: ports/107478: [maintainer] security/nmap fix build on AMD64 Message-ID: <200701031625.l03GPQfD009439@aphrodite.roe> Resent-Message-ID: <200701031620.l03GKIYx085933@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 107478 >Category: ports >Synopsis: [maintainer] security/nmap fix build on AMD64 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Jan 03 16:20:18 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Daniel Roethlisberger >Release: FreeBSD 6.1-RELEASE-p10 i386 >Organization: >Environment: System: FreeBSD aphrodite.roe 6.1-RELEASE-p10 FreeBSD 6.1-RELEASE-p10 #9: Sat Oct 21 15:21:13 CEST 2006 root@aphrodite.roe:/usr/obj/usr/src/sys/APHRODITE i386 >Description: Attached patch should fix build on all platforms where va_copy(a,b) cannot be replaced by a = b. Breakage was due to the fact that OSVERSION was used incorrectly in a previous FreeBSD 4.x specific fix. >How-To-Repeat: >Fix: --- nmap-4.20-osrel.diff begins here --- diff -ruN nmap.orig/files/patch-output.cc nmap/files/patch-output.cc --- nmap.orig/files/patch-output.cc Wed Jan 3 17:12:46 2007 +++ nmap/files/patch-output.cc Wed Jan 3 17:16:21 2007 @@ -1,12 +1,20 @@ --- output.cc.orig Fri Dec 8 04:01:19 2006 -+++ output.cc Mon Dec 18 15:50:13 2006 -@@ -742,8 +742,8 @@ ++++ output.cc Wed Jan 3 17:10:43 2007 +@@ -109,6 +109,7 @@ + #include "NmapOutputTable.h" + #include "MACLookup.h" + ++#include <sys/param.h> + #include <string> + + /* Workaround for lack of namespace std on HP-UX 11.00 */ +@@ -742,8 +743,8 @@ case LOG_MACHINE: case LOG_SKID: case LOG_XML: -#ifdef WIN32 - apcopy = ap; -+#if defined(WIN32) || (defined(FREEBSD) && (OSVERSION < 500000)) ++#if defined(WIN32) || (defined(FREEBSD) && (__FreeBSD_version < 500000)) + apcopy = ap; #else va_copy(apcopy, ap); /* Needed in case we need to so a second vnsprintf */ diff -ruN nmap.orig/files/patch-tcpip.cc nmap/files/patch-tcpip.cc --- nmap.orig/files/patch-tcpip.cc Wed Jan 3 17:12:46 2007 +++ nmap/files/patch-tcpip.cc Wed Jan 3 17:15:57 2007 @@ -1,20 +1,29 @@ --- tcpip.cc.orig Fri Dec 8 04:01:19 2006 -+++ tcpip.cc Mon Dec 18 15:48:46 2006 -@@ -1959,7 +1959,7 @@ ++++ tcpip.cc Wed Jan 3 17:15:05 2007 +@@ -133,6 +133,8 @@ + #endif /* NETINET_IF_ETHER_H */ + #endif /* HAVE_NETINET_IF_ETHER_H */ + ++#include <sys/param.h> ++ + extern NmapOps o; + + #ifdef WIN32 +@@ -1959,7 +1961,7 @@ // 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) && (OSVERSION < 500000)) ++#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000)) return false; #endif return true; -@@ -1972,7 +1972,7 @@ +@@ -1972,7 +1974,7 @@ 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) && (OSVERSION < 500000)) ++#if defined(WIN32) || defined(MACOSX) || (defined(FREEBSD) && (__FreeBSD_version < 500000)) return -1; #else assert(pcap_selectable_fd_valid()); --- nmap-4.20-osrel.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200701031625.l03GPQfD009439>