Nmap Development mailing list archives

Re: WSAPoll() needs Vista


From: Henri Doreau <henri.doreau () gmail com>
Date: Thu, 1 Nov 2012 21:29:43 +0100

2012/11/1 Gisle Vanem <gvanem () broadpark no>

I just built nmap on my Win-XP machine from today's SVN and got an error
stating that WSAPoll wasn't found in ws2_32.dll. [1] confirms this.

So, for me an easy fix for me was to "#define HAVE_POLL" only for
(_WIN32_WINNT >= 0x0600):

--- SVN-Latest\nsock\include\**nsock_winconfig.h    2012-11-01
18:11:41.214843500 +0100
+++ nsock\include\nsock_winconfig.**h   2012-11-01 20:42:02.402343500
+0100
@@ -97,6 +97,8 @@
#define HAVE_PCAP 1
#endif

+#if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0600)
#define HAVE_POLL 1
+#endif

#endif /* NSOCK_WINCONFIG_H */

[1] http://msdn.microsoft.com/en-**us/library/windows/desktop/**
ms741669(v=vs.85).aspx<http://msdn.microsoft.com/en-us/library/windows/desktop/ms741669(v=vs.85).aspx>

--gv


Hi,

thanks for the report and the patch.

Is this check the standard way to do it on windows? It seems a bit cryptic
to me and a quick search doesn't show anything similar in the nmap code. Is
there a way for our compile chain on windows to dynamically define
HAVE_POLL, depending on the availability of the WSAPoll() function? In
other words, an actual function test (as done by configure on *nix systems)
instead of an OS version number check?

Regards

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


Current thread: