#512 getaddrinfo on Windows 2000

Platform_Specific
open
nobody
Net (141)
5
2012-09-14
2012-03-12
Anonymous
No

Since POCO 1.4.3, getaddrinfo has been used for all Poco::Net::DNS::hostByName and hostByAddress calls, on all Windows platforms. However, on Windows 2000, this incurs a runtime dynamic linking error, a well-known issue:

http://support.microsoft.com/kb/955045
http://msdn.microsoft.com/en-us/library/windows/desktop/ms738520(v=vs.85).aspx
["Support for getaddrinfo on Windows 2000 and older versions"]

The easiest solution to this problem is to add

include <wspiapi.h>

underneath

include <ws2tcpip.h>

in Poco/Net/SocketDefs.h

This fixes the problem entirely. Thanks,

Discussion