mirror of https://github.com/moparisthebest/curl
MSVC fix for 'socklen_t'. Replace <winsock.h> with <winsock2.h> +
<ws2tcpip.h> since IPv6 is no longer optional (was it ever?)
This commit is contained in:
parent
3fb04115fc
commit
db4c33b4fb
|
@ -19,8 +19,10 @@
|
||||||
#else
|
#else
|
||||||
/* simple work-around for now, for systems without configure support */
|
/* simple work-around for now, for systems without configure support */
|
||||||
#define ssize_t int
|
#define ssize_t int
|
||||||
|
#ifndef _MSC_VER
|
||||||
#define socklen_t int
|
#define socklen_t int
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Recent autoconf versions define these symbols in config.h. We don't want
|
/* Recent autoconf versions define these symbols in config.h. We don't want
|
||||||
them (since they collide with the libcurl ones when we build
|
them (since they collide with the libcurl ones when we build
|
||||||
|
@ -35,7 +37,8 @@
|
||||||
|
|
||||||
/* now typedef our socket type */
|
/* now typedef our socket type */
|
||||||
#if defined(WIN32) && !defined(WATT32)
|
#if defined(WIN32) && !defined(WATT32)
|
||||||
#include <winsock.h>
|
#include <winsock2.h>
|
||||||
|
#include <ws2tcpip.h>
|
||||||
typedef SOCKET ares_socket_t;
|
typedef SOCKET ares_socket_t;
|
||||||
#define ARES_SOCKET_BAD INVALID_SOCKET
|
#define ARES_SOCKET_BAD INVALID_SOCKET
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue