[Nice] [nice/master] Adding wspiapi.h include for windows since versions prior to windows XP do not have the getaddrinfo/freeaddrinfo/getnameinfo functions in ws2_32.dll. As described in : http://msdn.microsoft.com/en-us/library/ms738532(VS.85).aspx <quote>The getnameinfo function was added to the Ws2_32.dll on Windows XP and later. If you want to execute an application using this function on earlier versions of Windows (Windows 2000, Windows NT, and Windows Me/98/95), then you need to include the Ws2tcpip.h file and also include the Wspiapi.h file. When the Wspiapi.h include file is added, the getnameinfo function is defined to the WspiapiGetNameInfo inline function in the Wspiapi.h file. At runtime, the WspiapiGetNameInfo function is implemented in such a way that if the Ws2_32.dll or the Wship6.dll (the file containing getnameinfo in the IPv6 Technology Preview for Windows 2000) does not include getnameinfo, then a version of getnameinfo is implemented inline based on code in the Wspiapi.h header file. This inline code will be used on older Windows platforms that do not natively support the getnameinfo function.</quote>

Youness Alaoui youness.alaoui at collabora.co.uk
Thu Nov 6 15:33:19 PST 2008


Thanks to BW from aMSN forums for helping me find this!
---
 agent/address.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/agent/address.h b/agent/address.h
index 89c5740..d83131b 100644
--- a/agent/address.h
+++ b/agent/address.h
@@ -53,6 +53,7 @@
 #ifdef G_OS_WIN32
 #include <winsock2.h>
 #include <ws2tcpip.h>
+#include <wspiapi.h>
 #else
 #include <sys/types.h>
 #include <sys/socket.h>
-- 
1.5.6.5




More information about the Nice mailing list