Nmap Development mailing list archives

Re: Mac OS X compile error using svn


From: Kris Katterjohn <katterjohn () 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

Attachment: signature.asc
Description: OpenPGP digital signature


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

Current thread: