windows: Use _getmaxstdio as replacement for syscall(_SC_OPEN_MAX)
This commit is contained in:
1 parent
a3f7dfc1ca
commit
d3c30b356c
1 file changed
+4
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user