diff --git a/code/ryzom/client/src/client.cpp b/code/ryzom/client/src/client.cpp index 54549bb51..7967c24db 100644 --- a/code/ryzom/client/src/client.cpp +++ b/code/ryzom/client/src/client.cpp @@ -25,11 +25,16 @@ // Misc. #include "nel/misc/types_nl.h" -#if defined(NL_OS_WINDOWS) +#ifdef NL_OS_WINDOWS #include #include #endif +#ifdef NL_OS_MAC +#include +#include +#endif + #include "nel/misc/debug.h" #include "nel/misc/command.h" #include "nel/net/tcp_sock.h" @@ -364,6 +369,20 @@ int main(int argc, char **argv) // temporary buffer to store Ryzom full path char filename[1024]; +#ifdef NL_OS_MAC + struct rlimit rlp, rlp2, rlp3; + + getrlimit(RLIMIT_NOFILE, &rlp); + + rlp2.rlim_cur = 1024; + rlp2.rlim_max = rlp.rlim_max; + setrlimit(RLIMIT_NOFILE, &rlp2); + + getrlimit(RLIMIT_NOFILE, &rlp3); + nlinfo("rlimit before %d %d\n", rlp.rlim_cur, rlp.rlim_max); + nlinfo("rlimit after %d %d\n", rlp3.rlim_cur, rlp3.rlim_max); +#endif + #if defined(NL_OS_WINDOWS) /* Windows bug: When the Window IconeMode is in "ThumbNails" mode, the current path is set to