Nmap Development mailing list archives

win32 build error with svn r9113


From: jah <jah () zadkiel plus com>
Date: Sat, 26 Jul 2008 03:45:12 +0100

Hello,

I'm getting a build error for nmap:

tcpip.cc
..\tcpip.cc(170) : error C2664: 'setsockopt' : cannot convert parameter
4 from 'void *' to 'const char *'
        Conversion from 'void*' to pointer to non-'void' requires an
explicit cast


from:

void set_ipoptions(int sd, void *opts, size_t optslen)
...
setsockopt(sd, IPPROTO_IP, IP_OPTIONS, opts, optslen);
...


I tried setsockopt(sd, IPPROTO_IP, IP_OPTIONS, (const char *) &opts,
optslen) and then came up against a linker error instead:

Linking...
LINK : warning LNK4224: /OPT:NOWIN98 is no longer supported;  ignored
LINK : fatal error LNK1104: cannot open file 'nsock.lib'


with this in nsock:

nsock_connect.c
.\src\nsock_connect.c(109) : error C2664: 'setsockopt' : cannot convert
parameter 4 from 'int *__w64 ' to 'const char *'
        Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
.\src\nsock_connect.c(110) : warning C4267: 'argument' : conversion from
'size_t' to 'int', possible loss of data
.\src\nsock_connect.c(118) : error C2664: 'setsockopt' : cannot convert
parameter 4 from 'void *' to 'const char *'
        Conversion from 'void*' to pointer to non-'void' requires an
explicit cast


and so, I'm out of my depth I think...


Regards,


jah

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


Current thread: