From: Gunnar Beutner Date: Fri, 9 Jan 2015 10:43:57 +0000 (+0100) Subject: Disable Application::SetResourceLimits on non-Linux systems X-Git-Tag: v2.3.0~407 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b17fc34a84f66ea73ba12925dff07b37c61162d9;p=icinga2 Disable Application::SetResourceLimits on non-Linux systems fixes #8178 --- diff --git a/lib/base/application.cpp b/lib/base/application.cpp index 7b511307e..2c549a8bf 100644 --- a/lib/base/application.cpp +++ b/lib/base/application.cpp @@ -176,7 +176,7 @@ Application::Ptr Application::GetInstance(void) void Application::SetResourceLimits(void) { -#ifndef _WIN32 +#ifdef __linux__ rlimit rl; # ifdef RLIMIT_NOFILE @@ -252,7 +252,7 @@ void Application::SetResourceLimits(void) # else /* RLIMIT_STACK */ Log(LogNotice, "Application", "System does not support adjusting the resource limit for stack size (RLIMIT_STACK)"); # endif /* RLIMIT_STACK */ -#endif /* _WIN32 */ +#endif /* __linux__ */ } int Application::GetArgC(void)