mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
clamd: use setrlimit() also when using GNU libc
setrlimit() is a POSIX API; while it can be used in more places, expand its usage to any platform based on GNU libc.
This commit is contained in:
parent
f95afb4a19
commit
39c80e3df7
1 changed files with 3 additions and 3 deletions
|
@ -51,7 +51,7 @@
|
|||
#include <syslog.h>
|
||||
#endif
|
||||
|
||||
#ifdef C_LINUX
|
||||
#if defined(C_LINUX) || defined(__GLIBC__)
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
|
@ -150,7 +150,7 @@ int main(int argc, char **argv)
|
|||
struct sigaction sa;
|
||||
int dropPrivRet = 0;
|
||||
#endif
|
||||
#if defined(C_LINUX) || (defined(RLIMIT_DATA) && defined(C_BSD))
|
||||
#if defined(C_LINUX) || defined(__GLIBC__) || (defined(RLIMIT_DATA) && defined(C_BSD))
|
||||
struct rlimit rlim;
|
||||
#endif
|
||||
time_t currtime;
|
||||
|
@ -201,7 +201,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
if (optget(opts, "debug")->enabled) {
|
||||
#if defined(C_LINUX)
|
||||
#if defined(C_LINUX) || defined(__GLIBC__)
|
||||
/* njh@bandsman.co.uk: create a dump if needed */
|
||||
rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY;
|
||||
if (setrlimit(RLIMIT_CORE, &rlim) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue