Nmap Development mailing list archives
Re: Missing getaddrinfo on Windows 2000--almost solved
From: Vlatko Kosturjak <kost () linux hr>
Date: Sat, 23 Aug 2008 14:26:46 +0200
I don't have a WIndows box handy to test on, so Rob could you try this patch? Visual Studio 2008 declares inet_ntop and inet_pton, but those functions are only actually available on Windows Vista and later. This patch allows testing for the declaration separately from the definition, so we declare the functions only if necessary and then always compile nbase's versions.
Your patch has compiling errors: Compiling... cl : Command line warning D9035 : option 'Wp64' has been deprecated and will be removed in a future release inet_ntop.c c:\src\w2k\nmap-4.68\nbase\inet_ntop.c(75) : error C2373: 'inet_ntop' : redefinition; different type modifiers c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(595) : see declaration of 'inet_ntop' inet_pton.c c:\src\w2k\nmap-4.68\nbase\inet_pton.c(83) : error C2373: 'inet_pton' : redefinition; different type modifiers c:\program files\microsoft sdks\windows\v6.0a\include\ws2tcpip.h(579) : see declaration of 'inet_pton' c:\src\w2k\nmap-4.68\nbase\inet_pton.c(231) : warning C4244: 'initializing' : conversion from '__w64 int' to 'const int', possible loss of data nbase_memalloc.c nbase_misc.c nbase_rnd.c nbase_str.c nbase_time.c strcasecmp.c getopt.c Generating Code...
Another potential source of incompatibility is that Windows declares the string parameters to the functions as PTSTR, which is a pointer to either char or wchar_t. If the patch doesn't work, please try again after adding the line #undef UNICODE above #include <ws2tcpip.h>
As excpected. Adding #undef UNICODE doesn't help in compiling problems. Do note that plain nmap stable(4.68) compiles fine. -- Vlatko Kosturjak - KoSt ICQ: 3631122 _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- Re: Missing getaddrinfo on Windows 2000--almost solved Vlatko Kosturjak (Aug 23)
- Re: Missing getaddrinfo on Windows 2000--almost solved David Fifield (Aug 23)
- RE: Missing getaddrinfo on Windows 2000--almost solved Rob Nicholls (Aug 23)
- Re: Missing getaddrinfo on Windows 2000--almost solved Vlatko Kosturjak (Aug 24)
- Re: Missing getaddrinfo on Windows 2000--almost solved Vlatko Kosturjak (Aug 24)
- Re: Missing getaddrinfo on Windows 2000--almost solved Fyodor (Sep 02)
- Re: Missing getaddrinfo on Windows 2000--almost solved David Fifield (Aug 24)
- Re: Missing getaddrinfo on Windows 2000--almost solved Kris Katterjohn (Aug 26)
- RE: Missing getaddrinfo on Windows 2000--almost solved Rob Nicholls (Aug 27)
- Re: Missing getaddrinfo on Windows 2000--almost solved David Fifield (Aug 27)
- Re: Missing getaddrinfo on Windows 2000--almost solved Kris Katterjohn (Aug 27)
- Re: Missing getaddrinfo on Windows 2000--almost solved David Fifield (Aug 23)