diff options
author | Peter Powell <petpow@saberuk.com> | 2018-02-17 17:12:26 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-02-17 17:12:26 +0000 |
commit | d2efdbf6bb91229d043303b1694fefae79ea6fe7 (patch) | |
tree | bc256da2d24eaf978af4a04cd45f79045c0b745d /src/socketengine.cpp | |
parent | 36e6dc7bc8c21db2f8fa63c96b3e3aa23886e056 (diff) |
Fix building on Windows (mostly).
Diffstat (limited to 'src/socketengine.cpp')
-rw-r--r-- | src/socketengine.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/socketengine.cpp b/src/socketengine.cpp index 10a0e51a2..df6ff5a02 100644 --- a/src/socketengine.cpp +++ b/src/socketengine.cpp @@ -71,6 +71,9 @@ void SocketEngine::InitError() void SocketEngine::LookupMaxFds() { +#if defined _WIN32 + MaxSetSize = FD_SETSIZE; +#else struct rlimit limits; if (!getrlimit(RLIMIT_NOFILE, &limits)) MaxSetSize = limits.rlim_cur; @@ -82,6 +85,7 @@ void SocketEngine::LookupMaxFds() #endif if (!setrlimit(RLIMIT_NOFILE, &limits)) MaxSetSize = limits.rlim_cur; +#endif } void SocketEngine::ChangeEventMask(EventHandler* eh, int change) |