Skip to content
Snippets Groups Projects
Commit e9f87f95 authored by deuce's avatar deuce
Browse files

Attempt to fix for windows. We don't currently include ws2tcpip.h which

is what defines socklen_t, so we need to undefine our copy before including
that header.
parent 5be83329
No related branches found
No related tags found
No related merge requests found
...@@ -7,6 +7,17 @@ ...@@ -7,6 +7,17 @@
#include <sockwrap.h> #include <sockwrap.h>
#include <multisock.h> #include <multisock.h>
#ifdef _WIN32
#undef socklen_t
#include <ws2tcpip.h>
# ifndef AI_ADDRCONFIG
# define AI_ADDRCONFIG 0x400 // Vista or later
# endif
# ifndef AI_NUMERICSERV
# define AI_NUMERICSERV 0 // Not supported by Win32
# endif
#endif
struct xpms_set *xpms_create(unsigned int retries, unsigned int wait_secs, struct xpms_set *xpms_create(unsigned int retries, unsigned int wait_secs,
int (*lprintf)(int level, const char *fmt, ...)) int (*lprintf)(int level, const char *fmt, ...))
{ {
......
...@@ -42,6 +42,8 @@ ...@@ -42,6 +42,8 @@
#include <stdio.h> /* SEEK_SET */ #include <stdio.h> /* SEEK_SET */
#include <string.h> #include <string.h>
#if defined(_WIN32) #if defined(_WIN32)
#undef socklen_t
#include <ws2tcpip.h>
#include <malloc.h> /* alloca() on Win32 */ #include <malloc.h> /* alloca() on Win32 */
#endif #endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment