Nmap Development mailing list archives
Re: win32 build error with svn r9113
From: "Michael Pattrick" <mpattrick () rhinovirus org>
Date: Fri, 25 Jul 2008 22:59:57 -0400
Hey Jah, I've been getting that for a while as well, but I thought it was just me. Ive attached a patch that should fix the problem. C++ doesn't allow for implicit casts from void * to any other type for good reason, but this should be safe. Cheers, Michael On Fri, Jul 25, 2008 at 10:45 PM, jah <jah () zadkiel plus com> wrote:
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
Attachment:
mspatch.diff
Description:
_______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- win32 build error with svn r9113 jah (Jul 25)
- Re: win32 build error with svn r9113 Michael Pattrick (Jul 25)
- Re: win32 build error with svn r9113 Kris Katterjohn (Jul 25)
- Re: win32 build error with svn r9113 jah (Jul 26)
