Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:
edgeos

Nmap Development: Re: Mac OS X compile error using svn

Re: Mac OS X compile error using svn

From: Kris Katterjohn <katterjohn_at_gmail.com>
Date: Sun, 28 Oct 2007 19:18:43 -0500

Michael Bakeman wrote:
> After updateing with "svn up" everything went well with ./configure but
> crashed during make
>
> Lucifer:~/software/nmap mike$ make
> Compiling libdnet
> Making all in include
> make all-recursive
> Making all in dnet
> make[4]: Nothing to be done for `all'.
> Making all in src
> make[2]: Nothing to be done for `all'.
> make[2]: Nothing to be done for `all-am'.
> Compiling libnbase
> cd nbase && make
> make[1]: Nothing to be done for `all'.
> Compiling libnsock
> cd nsock/src && make
> cd ../../nbase && make
> make[2]: Nothing to be done for `all'.
> Compiling nse-standard-library
> make[1]: Nothing to be done for `all'.
> make nmap nmapfe/nmapfe build-zenmap
> g++ -c -Ilibdnet-stripped/include -no-cpp-precomp -g -O2 -Wall
> -fno-strict-aliasing -Inbase -Insock/include -DHAVE_CONFIG_H
> -DNMAP_NAME=\"Nmap\" -DNMAP_URL=\"http://insecure.org\"
> -DNMAP_PLATFORM=\"i386-apple-darwin8.10.1\"
> -DNMAPDATADIR=\"/usr/local/share/nmap\"
> -DNMAPLIBEXECDIR=\"/usr/local/libexec/nmap\" main.cc -o main.o
> nbase/getopt.h:37: error: declaration of C function 'int getopt(int,
> char**, const char*)' conflicts with
> /usr/include/unistd.h:422: error: previous declaration 'int getopt(int,
> char* const*, const char*)' here
> make[1]: *** [main.o] Error 1
> make: *** [all] Error 2
> Lucifer:~/software/nmap mike$
>
> Thanks,
> Mike
>

Okay, that's from a change I've made. I added a new getopt()
replacement to nbase, which has been tested on (at least) Linux and Windows.

Does getopt.c compile when you make nbase? If not, just adding const to
getopt (and maybe getopt_long*) should fix the problems. If you let me
know, I can try to commit a fix.

Thanks,
Kris Katterjohn

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org

Received on Oct 28 2007
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]