diff --git a/src/compat/compat.h b/src/compat/compat.h index 51ed03eef48..75f47bc7007 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -10,14 +10,17 @@ #include #endif +// Windows defines FD_SETSIZE to 64 (see _fd_types.h in mingw-w64), +// which is too small for our usage, but allows us to redefine it safely. +// We redefine it to be 1024, to match glibc, see typesizes.h. #ifdef WIN32 #ifdef FD_SETSIZE -#undef FD_SETSIZE // prevent redefinition compiler warning +#undef FD_SETSIZE #endif -#define FD_SETSIZE 1024 // max number of fds in fd_set +#define FD_SETSIZE 1024 #include #include -#include +#include #else #include #include