windows: Use _getmaxstdio as replacement for syscall(_SC_OPEN_MAX)
This commit is contained in:
@@ -418,7 +418,11 @@ void closefrom(int lowfd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ...fall back to closing all fds otherwise */
|
/* ...fall back to closing all fds otherwise */
|
||||||
|
#ifdef WIN32
|
||||||
|
maxfd = _getmaxstdio();
|
||||||
|
#else
|
||||||
maxfd = (int)sysconf(_SC_OPEN_MAX);
|
maxfd = (int)sysconf(_SC_OPEN_MAX);
|
||||||
|
#endif
|
||||||
if (maxfd < 0)
|
if (maxfd < 0)
|
||||||
{
|
{
|
||||||
maxfd = 256;
|
maxfd = 256;
|
||||||
|
|||||||
Reference in New Issue
Block a user