# HG changeset patch # User alex # Date 1179763683 0 # Node ID 621b55f8eac4f875cd7f75d2597d1c11eb6bd8c8 # Parent 995baffaa001570f6bb4b979aa0a3d382e8eb626 r9095 invalidly removed the check for non-winsock diff -r 995baffaa001 -r 621b55f8eac4 os_support.c --- a/os_support.c Mon May 21 15:54:35 2007 +0000 +++ b/os_support.c Mon May 21 16:08:03 2007 +0000 @@ -139,10 +139,12 @@ int n; int rc; +#ifdef __MINGW32__ if (numfds >= FD_SETSIZE) { errno = EINVAL; return -1; } +#endif FD_ZERO(&read_set); FD_ZERO(&write_set); @@ -152,6 +154,12 @@ for(i = 0; i < numfds; i++) { if (fds[i].fd < 0) continue; +#ifndef __MINGW32__ + if (fds[i].fd >= FD_SETSIZE) { + errno = EINVAL; + return -1; + } +#endif if (fds[i].events & POLLIN) FD_SET(fds[i].fd, &read_set); if (fds[i].events & POLLOUT) FD_SET(fds[i].fd, &write_set);