diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-08-23 16:41:29 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2009-08-23 16:41:29 +0200 |
commit | d4bc6fa954f11b1da0c8881c2826ac4a60f8c41e (patch) | |
tree | c24b7b1ec877a102b86a3af47e01bf40e04cb4ac /libssh/connect.c | |
parent | 8bae43876fff891e33d48b177778ee4cb882c45a (diff) | |
parent | fbfea94559aa776bca7983ef989d024c2d3b72fe (diff) | |
download | libssh-d4bc6fa954f11b1da0c8881c2826ac4a60f8c41e.tar.gz libssh-d4bc6fa954f11b1da0c8881c2826ac4a60f8c41e.tar.xz libssh-d4bc6fa954f11b1da0c8881c2826ac4a60f8c41e.zip |
Merge branch 'master' of git://git.libssh.org/projects/libssh/libssh
Conflicts:
include/libssh/priv.h
Diffstat (limited to 'libssh/connect.c')
-rw-r--r-- | libssh/connect.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/libssh/connect.c b/libssh/connect.c index e08cd16..d8898ef 100644 --- a/libssh/connect.c +++ b/libssh/connect.c @@ -28,13 +28,25 @@ #include <string.h> #ifdef _WIN32 -/* getaddrinfo, freeaddrinfo, getnameinfo */ -#define _WIN32_WINNT 0x0501 +/* + * Only use Windows API functions available on Windows 2000 SP4 or later. + * The available constants are in <sdkddkver.h>. + * http://msdn.microsoft.com/en-us/library/aa383745.aspx + * http://blogs.msdn.com/oldnewthing/archive/2007/04/11/2079137.aspx + */ +#undef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 /* _WIN32_WINNT_WIN2K */ +#undef NTDDI_VERSION +#define NTDDI_VERSION 0x05000400 /* NTDDI_WIN2KSP4 */ #include <winsock2.h> #include <ws2tcpip.h> -#include "wspiapi.h" /* Workaround for w2k systems */ +/* <wspiapi.h> is necessary for getaddrinfo before Windows XP, but it isn't + * available on some platforms like MinGW. */ +#ifdef HAVE_WSPIAPI_H +#include <wspiapi.h> +#endif #else /* _WIN32 */ |