diff --git a/src/main/select.c b/src/main/select.c index df497634..a88ac270 100644 --- a/src/main/select.c +++ b/src/main/select.c @@ -4,12 +4,6 @@ #include "config.h" #endif -#ifdef HAVE_WS2TCPIP_H -/* On Windows the default value of FD_SETSIZE is 64, - * but can be set to any other value before including winsock2.h */ -#define FD_SETSIZE 1024 -#endif - #include #include #include /* FreeBSD FD_ZERO() macro calls bzero() */ @@ -59,7 +53,12 @@ struct thread { void *data; }; +#ifdef CONFIG_OS_WIN32 +/* CreatePipe produces big numbers for handles */ +static struct thread threads[4096]; +#else static struct thread threads[FD_SETSIZE]; +#endif static fd_set w_read; static fd_set w_write; diff --git a/src/osdep/win32/overrides.c b/src/osdep/win32/overrides.c index 82d46336..be04991d 100644 --- a/src/osdep/win32/overrides.c +++ b/src/osdep/win32/overrides.c @@ -8,8 +8,6 @@ #include "config.h" #endif -#define FD_SETSIZE 1024 - #define WIN32_OVERRIDES_SELF #include "osdep/system.h"