Nmap Development mailing list archives
[Patch] building nmap-4.03
From: Peter O'Gorman <nmap-dev () mlists thewrittenword com>
Date: Tue, 30 May 2006 08:52:06 -0500
Hi, We just build nmap-4.03, and had some issues, mostly with AIX and libdnet. There are some serious problems with libdnet on AIX. Although a separate download of libdnet itself actually builds, it is unusable. The headers conflict with system headers. For example, aix has '#define ip_v ip_ff.ip_fv' in netinet/ip.h, which causes great compiler confusion when it is included after dnet/ip.h which has "uint8_t ip_v:4". We went through these and preixed them with dnet_. In a few places, libdnet has '# define __attribute__(x)' which is okay, but the compiler barfs if __attribute__ is already defined, so we #ifndef __attribute__ around them. Aix #defines ICMP_INFOTYPE, icmp_gwaddr, icmp_pptr, since nothing appears to use these, we simply removed them from libdnet. While aix does have a radix.h, and it appears mostly compatible with the tru64 version, the #ifdef here is really checking for tru64, aix does not have some of the structs and members being used: "route-bsd.c", line 474.37: 1506-022 (S) "rnh_next" is not a member of "struct radix_node_head". "route-bsd.c", line 477.26: 1506-022 (S) "rnh_af" is not a member of "struct radix_node_head". "arp-ioctl.c", line 418.55: 1506-022 (S) "at_hwaddr" is not a member of "struct arptab". "arp-ioctl.c", line 439.16: 1506-007 (S) "struct ifnet_arp_cache_head" is undefined. I cheated here, and just added && ! defined (_AIX) To get away from aix for a bit, hpux-10.20 does not have SIOCGIFMTU or SIOCSIFMTU. It had other issues also, and I again cheated and did: ac_cv_header_hpsecurity_h=no ac_cv_header_sys_mib_h=no before configure. While these headers exist, they differ significantly from hpux11 and nmap does not build with them. For slightly more normal issues, nmapfe/nmapfe_sig.c declares a variable in the middle of a block, this is not accepted by all compilers. We also had to cast the return value of a gobject_get_data to a function pointer. Thanks for nmap, patch attached. Peter
Attachment:
nmap.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev
Current thread:
- [Patch] building nmap-4.03 Peter O'Gorman (May 30)
- Re: [Patch] building nmap-4.03 Fyodor (Jun 09)