Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Dec 2006 13:27:03 +0100 (CET)
From:      Daniel Roethlisberger <daniel@roe.ch>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        daniel@roe.ch, miwi@FreeBSD.org
Subject:   ports/106911: [maintainer] security/nmap fix build for FreeBSD 4.x
Message-ID:  <200612191227.kBJCR3Cf050495@aphrodite.roe>
Resent-Message-ID: <200612191300.kBJD0VRo054372@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         106911
>Category:       ports
>Synopsis:       [maintainer] security/nmap fix build for FreeBSD 4.x
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Dec 19 13:00:30 GMT 2006
>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:
Add: files/patch-output.cc files/patch-tcpip.cc

Fix build on FreeBSD 4.x.

Requested by: out.law at virgilio.it
>How-To-Repeat:
>Fix:
--- nmap-4.20-fbsd4x.diff begins here ---
diff -ruN nmap.orig/Makefile nmap/Makefile
--- nmap.orig/Makefile	Tue Dec 12 21:32:37 2006
+++ nmap/Makefile	Tue Dec 19 13:10:13 2006
@@ -81,10 +81,4 @@
 
 .endif
 
-.include <bsd.port.pre.mk>
-
-.if ${OSVERSION} < 500000
-BROKEN=		Does not compile on 4.x
-.endif
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff -ruN nmap.orig/files/patch-output.cc nmap/files/patch-output.cc
--- nmap.orig/files/patch-output.cc	Thu Jan  1 01:00:00 1970
+++ nmap/files/patch-output.cc	Tue Dec 19 13:09:51 2006
@@ -0,0 +1,13 @@
+--- output.cc.orig	Fri Dec  8 04:01:19 2006
++++ output.cc		Mon Dec 18 15:50:13 2006
+@@ -742,8 +742,8 @@
+   case LOG_MACHINE:
+   case LOG_SKID:
+   case LOG_XML:
+-#ifdef WIN32
+-	  apcopy = ap;
++#if defined(WIN32) || (defined(FREEBSD) && (OSVERSION < 500000))
++    apcopy = ap;
+ #else
+     va_copy(apcopy, ap); /* Needed in case we need to so a second vnsprintf */
+ #endif
diff -ruN nmap.orig/files/patch-tcpip.cc nmap/files/patch-tcpip.cc
--- nmap.orig/files/patch-tcpip.cc	Thu Jan  1 01:00:00 1970
+++ nmap/files/patch-tcpip.cc	Tue Dec 19 13:09:51 2006
@@ -0,0 +1,20 @@
+--- tcpip.cc.orig	Fri Dec  8 04:01:19 2006
++++ tcpip.cc		Mon Dec 18 15:48:46 2006
+@@ -1959,7 +1959,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))
+   return false;
+ #endif
+   return true;
+@@ -1972,7 +1972,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))
+   return -1;
+ #else
+   assert(pcap_selectable_fd_valid());
--- nmap-4.20-fbsd4x.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?200612191227.kBJCR3Cf050495>