optarg is defined in wpcap\libpcap\win32\Getopt.c, that is included in
libpcap mainly because the visual studio doesn't provide getopt in its
libraries. However this file is useless under cygnus (and in every case
putting it in wpcap.dll isn't a good choice), so the next version of
winpcap will not include. For the moment, you can try to:
- download the winpcap sources from http://winpcap.polito.it
- remove Getopt.c from wpcap\prj\GNUmakefile
- remove  optind optarg getopt and opterr from wpcap.def
- rebuild wpcap.dll
- link the new libwpcap.a that will be created

Loris

>
> Recently I have tried to port the Nessus 1.2 to cygwin under Win2k
with winpcap
> I succeed in building the nessus-libraries and libnasl with winpcap
library!
> But I encouter linkage error when I building the nessus-core
>
>
> -------
> gcc -g -O2  `sh ./cflags`  -c rtree.c
> rtree.c: In function `rtree_free':
> rtree.c:266: warning: passing arg 1 of `bzero' from incompatible
pointer type
> gcc -g -O2  `sh ./cflags`  -c pluginlaunch.c
> pluginlaunch.c: In function `process_mgr_sighand_term':
> pluginlaunch.c:86: warning: passing arg 1 of `bzero' from incompatible
pointer type
> pluginlaunch.c: In function `update_running_processes':
> pluginlaunch.c:153: warning: passing arg 1 of `bzero' from
incompatible pointer type
> pluginlaunch.c: In function `pluginlaunch_init':
> pluginlaunch.c:322: warning: passing arg 1 of `bzero' from
incompatible pointer type
> pluginlaunch.c: In function `pluginlaunch_stop':
> pluginlaunch.c:350: warning: passing arg 1 of `bzero' from
incompatible pointer type
> gcc -g -O2  `sh ./cflags`  -c locks.c
> gcc -g -O2  `sh ./cflags`  -c dirutils.c
> gcc -g -O2  `sh ./cflags`  -c md5.c
> gcc -g -O2  `sh ./cflags`  -c plugs_hash.c
> gcc -g -O2  `sh ./cflags`  -c pluginupload.c
> gcc  `sh ./cflags`  auth.o attack.o comm.o log.o rules.o sighand.o
threads.o users.o utils.o ntp_10.o ntp_11.o parser.o preferences.o
piic.o pluginload.o plugs_deps.o nasl_plugins.o nes_plugins.o
perl_plugins.o crypto-layer.o plugs_req.o rasort.o nessusd.o
save_tests.o save_kb.o detached.o rtree.o pluginlaunch.o locks.o
dirutils.o md5.o plugs_hash.o pluginupload.o  -o nessusd
`/usr/local/bin/nasl-config --libs`
`/usr/local/bin/nessus-config --libs`
> /usr/lib/libcygwin.a(getopt.o)(.bss+0x4): multiple definition of
`optarg'
> /usr/local/lib/libwpcap.a(d000026.o)(.text+0x0): first defined here
> collect2: ld returned 1 exit status
> make[1]: *** [nessusd] Error 1
> make[1]: Leaving directory
`/cygdrive/d/Security/Nessus/nessus-core/nessusd'
> make: *** [server] Error 2
>
> -------------------------------------------
>
> Is there a conflict between libwpcap and libcygwin?
> Attachment is all my build log.
>
>
> Sincerely
> ��??��?��
> Wales Wang
>
> 013910559290
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> http://freesoft.online.sh.cn
>



Reply via email to