Nmap Development mailing list archives
Re: Nping build breakage on opensolaris
From: David Fifield <david () bamsoftware com>
Date: Sat, 27 Mar 2010 15:33:25 -0600
On Sat, Mar 27, 2010 at 05:22:14PM +0100, Luis M. wrote:
I've just commited a patch that should fix the problem. Apparently Solaris does not define u_intXX_t types but only uintXX_t types. So I've just added a typedef manually. Also, I had problems with some ioctl() flags but including header file <sys/sockio.h> solved the problem. I've compiled it successfully in OpenSolaris 2009.06. I hope it also compiles in other Solaris versions. Can anybody please confirm this?
I don't think this is the best way to solve the problem, but it is good enough until the code in common* can be re-unified with other Nmap code. Instead of #ifdef SOLARIS typedef uint8_t u_int8_t; #endif it's better to do something like #ifndef HAVE_U_INT8_T (with an appropriate check in configure for u_int8_t). But that shouldn't even be necessary! Obviously tcpip.cc, which uses the exact same identifiers, is compiling. For SIOCGIFCONF, it's covered by this code in tcpip.h: #if HAVE_SYS_SOCKIO_H #include <sys/sockio.h> /* SIOCGIFCONF for Solaris */ #endif You might be able to find out where the u_int8_t definition comes from using the preprocessor. Just replace -c with -E in the line that makes tcpip.o. $ touch tcpip.cc $ make tcpip.o g++ -c -I/usr/include/lua -Ilibdnet-stripped/include -Inbase -Insock/include -g -O2 -Wall -fno-strict-aliasing -DHAVE_CONFIG_H -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://nmap.org\" -DNMAP_PLATFORM=\"i686-pc-linux-gnu\" -DNMAPDATADIR=\"/usr/share/nmap\" -D_FORTIFY_SOURCE=2 tcpip.cc -o tcpip.o $ g++ -E -I/usr/include/lua -Ilibdnet-stripped/include -Inbase -Insock/include -g -O2 -Wall -fno-strict-aliasing -DHAVE_CONFIG_H -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://nmap.org\" -DNMAP_PLATFORM=\"i686-pc-linux-gnu\" -DNMAPDATADIR=\"/usr/share/nmap\" -D_FORTIFY_SOURCE=2 tcpip.cc > tcpip.E Then in tcpip.E I have: # 195 "/usr/include/sys/types.h" 3 4 typedef int int8_t __attribute__ ((__mode__ (__QI__))); typedef int int16_t __attribute__ ((__mode__ (__HI__))); typedef int int32_t __attribute__ ((__mode__ (__SI__))); typedef int int64_t __attribute__ ((__mode__ (__DI__))); typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); That's what I originally tried including <sys/types.h>, but it must be in a different place on Solaris. I tried running the Solaris live CD, but had trouble because it didn't recognize my mouse, and I don't know how to install svn and gcc from the command line. David Fifield _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Nping build breakage on opensolaris jrf (Mar 12)
- Re: Nping build breakage on opensolaris David Fifield (Mar 12)
- Re: Nping build breakage on opensolaris Fyodor (Mar 23)
- Re: Nping build breakage on opensolaris Luis M. (Mar 24)
- Re: Nping build breakage on opensolaris Fyodor (Mar 25)
- Re: Nping build breakage on opensolaris David Fifield (Mar 24)
- Re: Nping build breakage on opensolaris Fyodor (Mar 25)
- Re: Nping build breakage on opensolaris Luis M. (Mar 27)
- Re: Nping build breakage on opensolaris David Fifield (Mar 27)
- Re: Nping build breakage on opensolaris Luis M. (Mar 24)