From nobody@FreeBSD.org  Thu Mar 22 13:57:06 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id B84E7106566C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 22 Mar 2012 13:57:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A37398FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 22 Mar 2012 13:57:06 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q2MDv6Tc062887
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 22 Mar 2012 13:57:06 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q2MDv6fS062886;
	Thu, 22 Mar 2012 13:57:06 GMT
	(envelope-from nobody)
Message-Id: <201203221357.q2MDv6fS062886@red.freebsd.org>
Date: Thu, 22 Mar 2012 13:57:06 GMT
From: Andrew Teixeira <teixeira@broadinstitute.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Missing include file causing compilation failure
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         166317
>Category:       ports
>Synopsis:       security/nmap: Missing include file causing compilation failure
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ohauer
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 22 14:00:23 UTC 2012
>Closed-Date:    Sun Jun 17 19:28:34 UTC 2012
>Last-Modified:  Sun Jun 17 19:28:34 UTC 2012
>Originator:     Andrew Teixeira
>Release:        7.1-RELEASE-p8
>Organization:
Broad Institute
>Environment:
FreeBSD xxxxxxxxxx.broadinstitute.org 7.1-RELEASE-p8 FreeBSD 7.1-RELEASE-p8 #2: Fri Oct 30 13:56:41 EDT 2009     root@xxxxxxxxxx.broadinstitute.org:/usr/obj/usr/src/sys/xxxxxxxxxx  amd64
>Description:
When compiling nmap-5.61.t5, it has a compilation error, which outputs the following:

gmake[1]: Entering directory `/usr/ports/security/nmap/work/nmap-5.61TEST5/libnetutil'
c++ -c -I../liblinear -I/usr/include/lua -I/usr/local/include/lua51 -I../libdnet-stripped/include -I/usr/local/include  -I/usr/include -I../nbase -I../nsock/include -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 -O -pipe -I/usr/include -Wall -fno-strict-aliasing netutil.cc -o netutil.o
In file included from netutil.cc:127:
/usr/include/netinet/ip.h:162: error: 'n_long' does not name a type
/usr/include/netinet/ip.h:165: error: 'n_long' does not name a type
gmake[1]: *** [netutil.o] Error 1
gmake[1]: Leaving directory `/usr/ports/security/nmap/work/nmap-5.61TEST5/libnetutil'
gmake: *** [netutil_build] Error 2
*** Error code 1

Stop in /usr/ports/security/nmap.
>How-To-Repeat:
portinstall nmap
 - or -
portupgrade nmap
>Fix:
--- libnetutil/netutil.cc.old	2012-03-22 09:51:28.000000000 -0400
+++ libnetutil/netutil.cc	2012-03-22 09:47:20.000000000 -0400
@@ -124,6 +124,7 @@
 #endif
 #endif
 #ifndef NETINET_IP_H  /* This guarding is needed for at least some versions of OpenBSD */
+#include <netinet/in_systm.h>
 #include <netinet/ip.h> 
 #define NETINET_IP_H
 #endif

It just seems that the netinet/in_systm.h include file needs to be present to provide the "n_long" typedef.

>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->ohauer 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu Mar 22 16:05:36 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166317 

From: Olli Hauer <ohauer@FreeBSD.org>
To: bug-followup@FreeBSD.org, teixeira@broadinstitute.org
Cc:  
Subject: Re: ports/166317: security/nmap: Missing include file causing compilation
 failure
Date: Tue, 10 Apr 2012 00:41:12 +0200

 Hi Andrew,
 
 is it possible for you to update your OS to FreeBSD-74 ?
 
 From http://security.freebsd.org/ 7.1 is EOL since "February 28, 2011" and this issue does not exist on 7.3/7.4.
 
 I'm testing build and functionality only against supported versions.
 
 
 --
 Regards,
 olli
State-Changed-From-To: open->closed 
State-Changed-By: ohauer 
State-Changed-When: Sun Jun 17 19:25:04 UTC 2012 
State-Changed-Why:  
I've added a patch for this issue in the last nmap update. 

However on top of the patch there is a big remark that this patch 
will be removed at last end of this year or during the next 
nmap releases. 



http://www.freebsd.org/cgi/query-pr.cgi?pr=166317 
>Unformatted:
