diff options
-rw-r--r-- | lib/setup.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/setup.h b/lib/setup.h index 536d4d90a..64073204f 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -113,14 +113,6 @@ typedef unsigned char bool; #endif #endif -#ifdef WIN32 -typedef SOCKET curl_socket_t; -#define CURL_SOCKET_BAD INVALID_SOCKET -#else -typedef int curl_socket_t; -#define CURL_SOCKET_BAD -1 -#endif - #if defined(HAVE_X509_H) && defined(HAVE_SSL_H) && defined(HAVE_RSA_H) && \ defined(HAVE_PEM_H) && defined(HAVE_ERR_H) && defined(HAVE_CRYPTO_H) && \ defined(HAVE_LIBSSL) && defined(HAVE_LIBCRYPTO) @@ -251,6 +243,15 @@ int fileno( FILE *stream); #endif +/* now typedef our socket type */ +#ifdef WIN32 +typedef SOCKET curl_socket_t; +#define CURL_SOCKET_BAD INVALID_SOCKET +#else +typedef int curl_socket_t; +#define CURL_SOCKET_BAD -1 +#endif + #if defined(ENABLE_IPV6) && defined(USE_ARES) #error "ares does not yet support IPv6. Disable IPv6 or ares and rebuild" #endif |