aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
authorGisle Vanem <gvanem@broadpark.no>2005-11-09 21:38:58 +0000
committerGisle Vanem <gvanem@broadpark.no>2005-11-09 21:38:58 +0000
commitdb4c33b4fb2ea457b4f0574e5c974f637d35c1ad (patch)
treef496a3b5aa50113763e95c49340bec38b3209ba5 /ares
parent3fb04115fcd8d00f6f697707701e375b3b5b95ae (diff)
MSVC fix for 'socklen_t'. Replace <winsock.h> with <winsock2.h> +
<ws2tcpip.h> since IPv6 is no longer optional (was it ever?)
Diffstat (limited to 'ares')
-rw-r--r--ares/setup.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/ares/setup.h b/ares/setup.h
index 619a285d2..d6e037812 100644
--- a/ares/setup.h
+++ b/ares/setup.h
@@ -19,8 +19,10 @@
#else
/* simple work-around for now, for systems without configure support */
#define ssize_t int
+#ifndef _MSC_VER
#define socklen_t int
#endif
+#endif
/* Recent autoconf versions define these symbols in config.h. We don't want
them (since they collide with the libcurl ones when we build
@@ -35,7 +37,8 @@
/* now typedef our socket type */
#if defined(WIN32) && !defined(WATT32)
-#include <winsock.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
typedef SOCKET ares_socket_t;
#define ARES_SOCKET_BAD INVALID_SOCKET
#else