>I'm currently amusing myself with gettings nessus up and running on my 
>Cygwin system. I got nessus-core compiled, but I get errors at linktime:
>
>/usr/lib/libcygwin.a(getopt.o)(.data+0x4): multiple definition of `optind'
>/usr/lib/libwpcap.a(d000028.o)(.text+0x0): first defined here
>/usr/lib/libcygwin.a(getopt.o)(.bss+0x4): multiple definition of `optarg'
>/usr/lib/libwpcap.a(d000026.o)(.text+0x0): first defined here

Okay, I did get myself the source, and saw that libwpcap had getopt in it. 
Hmm, why? Would someone please enlighten me?

In the meantime, I rebuilt libwpcap.a without getopt.

Hope to hear from the maintainers of this package, it'd be nice to know 
whether I'm just knuckle-headed or libwpcap was meant to be built with an 
older Cygwin version or what :)


Here's the diff the original sources:

diff -C2 -r winpcap/wpcap/PRJ/GNUmakefile 
winpcap.nogetopt/wpcap/PRJ/GNUmakefile
*** winpcap/wpcap/PRJ/GNUmakefile       Tue Sep 18 11:07:00 2001
--- winpcap.nogetopt/wpcap/PRJ/GNUmakefile      Sun Jul  7 10:54:43 2002
***************
*** 29,33 ****
         -I ../libpcap/bpf -I ../libpcap/lbl -I ../../common \
         -Dpcap_parse=yyparse -DYY_NEVER_INTERACTIVE -Dyylval=pcap_lval \
!       -DHAVE_STRERROR -DWIN32 -DNEED_ADDRINFO_H \
         -DSIZEOF_CHAR=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DINET6 \
         -mno-cygwin -shared ${OPTFLAGS}
--- 29,33 ----
         -I ../libpcap/bpf -I ../libpcap/lbl -I ../../common \
         -Dpcap_parse=yyparse -DYY_NEVER_INTERACTIVE -Dyylval=pcap_lval \
!       -DHAVE_STRERROR -DHAVE_SOCKADDR_STORAGE -DWIN32 -DNEED_ADDRINFO_H \
         -DSIZEOF_CHAR=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DINET6 \
         -mno-cygwin -shared ${OPTFLAGS}
***************
*** 43,47 ****
         ../libpcap/Win32/Src/getnetbynm.o \
         ../libpcap/Win32/Src/getnetent.o \
-       ../libpcap/Win32/Src/getopt.o \
         ../libpcap/Win32/Src/getservent.o \
         ../libpcap/grammar.o \
--- 43,46 ----
diff -C2 -r winpcap/wpcap/PRJ/WPCAP.DEF winpcap.nogetopt/wpcap/PRJ/WPCAP.DEF
*** winpcap/wpcap/PRJ/WPCAP.DEF Mon Sep 17 16:46:10 2001
--- winpcap.nogetopt/wpcap/PRJ/WPCAP.DEF        Sun Jul  7 10:56:43 2002
***************
*** 43,48 ****
                 getservent
                 eproto_db
-               optind
-               optarg
-               getopt
-               opterr
--- 43,44 ----



Reply via email to