diff options
Diffstat (limited to 'include/wsockcompat.h')
-rw-r--r-- | include/wsockcompat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/wsockcompat.h b/include/wsockcompat.h index 690048c..a898b05 100644 --- a/include/wsockcompat.h +++ b/include/wsockcompat.h @@ -10,6 +10,18 @@ #else #undef HAVE_ERRNO_H #include <winsock2.h> +#include <ws2tcpip.h> +/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */ +#if defined(GetAddrInfo) +#define HAVE_GETADDRINFO +#endif +#endif + +#ifdef __MINGW32__ +/* Include <errno.h> here to ensure that it doesn't get included later + * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */ +#include <errno.h> +#undef EWOULDBLOCK #endif #if !defined SOCKLEN_T |