aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2010-12-29 20:53:28 +0100
committerAndreas Schneider <asn@cynapses.org>2010-12-29 20:53:28 +0100
commit887d201bd3962982e1056c65fd21d270ec460702 (patch)
treeacd2274de0694ec73c5f7884884315f501b24612
parent126724081043880b647b7bb3974e136230b79d0c (diff)
downloadlibssh-887d201bd3962982e1056c65fd21d270ec460702.tar.gz
libssh-887d201bd3962982e1056c65fd21d270ec460702.tar.xz
libssh-887d201bd3962982e1056c65fd21d270ec460702.zip
server: Added missing include files for getaddrinfo on Windows.
-rw-r--r--src/bind.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/bind.c b/src/bind.c
index d0dfa887..babefe4c 100644
--- a/src/bind.c
+++ b/src/bind.c
@@ -47,8 +47,17 @@
#ifdef _WIN32
-
#include <winsock2.h>
+#include <ws2tcpip.h>
+
+/*
+ * <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
+
#define SOCKOPT_TYPE_ARG4 char
/*