summaryrefslogtreecommitdiffstats
path: root/libssh/connect.c
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2009-09-21 12:23:15 +0200
committerAndreas Schneider <mail@cynapses.org>2009-09-21 12:23:47 +0200
commit4133f484ae317909169ad8e1bc689d25cabd9a77 (patch)
treec179f9e1abd377d915de896c2befe9db860c0615 /libssh/connect.c
parent041aff8060ace97ddab83037acdd228727ab9220 (diff)
downloadlibssh-4133f484ae317909169ad8e1bc689d25cabd9a77.tar.gz
libssh-4133f484ae317909169ad8e1bc689d25cabd9a77.tar.xz
libssh-4133f484ae317909169ad8e1bc689d25cabd9a77.zip
Fixed building libssh with MSVC.
Thanks to Carlo Segato for the patch.
Diffstat (limited to 'libssh/connect.c')
-rw-r--r--libssh/connect.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libssh/connect.c b/libssh/connect.c
index ca08b884..c472d2f6 100644
--- a/libssh/connect.c
+++ b/libssh/connect.c
@@ -35,9 +35,15 @@
* http://blogs.msdn.com/oldnewthing/archive/2007/04/11/2079137.aspx
*/
#undef _WIN32_WINNT
+#ifdef HAVE_WSPIAPI_H
#define _WIN32_WINNT 0x0500 /* _WIN32_WINNT_WIN2K */
#undef NTDDI_VERSION
#define NTDDI_VERSION 0x05000400 /* NTDDI_WIN2KSP4 */
+#else
+#define _WIN32_WINNT 0x0501 /* _WIN32_WINNT_WINXP */
+#undef NTDDI_VERSION
+#define NTDDI_VERSION 0x05010000 /* NTDDI_WINXP */
+#endif
#include <winsock2.h>
#include <ws2tcpip.h>