windows: Use _getmaxstdio as replacement for syscall(_SC_OPEN_MAX)

This commit is contained in:
Martin Willi
2014-06-03 12:24:35 +02:00
parent a3f7dfc1ca
commit d3c30b356c
+4
View File
@@ -418,7 +418,11 @@ void closefrom(int lowfd)
}
/* ...fall back to closing all fds otherwise */
#ifdef WIN32
maxfd = _getmaxstdio();
#else
maxfd = (int)sysconf(_SC_OPEN_MAX);
#endif
if (maxfd < 0)
{
maxfd = 256;