From 7a4906fc753a5b6f26bbe952f3846fe741a440ef Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Fri, 2 Dec 2022 22:51:41 +0100 Subject: [PATCH] Assume RLIMIT_AS is defined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It is required by POSIX.1-2001. Cc: Christian Göttsche Signed-off-by: Alejandro Colomar --- libmisc/limits.c | 2 -- libmisc/pwd_init.c | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/libmisc/limits.c b/libmisc/limits.c index 846dd54a..bdee60a6 100644 --- a/libmisc/limits.c +++ b/libmisc/limits.c @@ -239,13 +239,11 @@ static int do_user_limits (const char *buf, const char *name) while ('\0' != *pp) { switch (*pp++) { -#ifdef RLIMIT_AS case 'a': case 'A': /* RLIMIT_AS - max address space (KB) */ retval |= setrlimit_value (RLIMIT_AS, pp, 1024); break; -#endif case 'c': case 'C': /* RLIMIT_CORE - max core file size (KB) */ diff --git a/libmisc/pwd_init.c b/libmisc/pwd_init.c index eb2bddf1..439361ac 100644 --- a/libmisc/pwd_init.c +++ b/libmisc/pwd_init.c @@ -32,9 +32,8 @@ void pwd_init (void) setrlimit (RLIMIT_CORE, &rlim); rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; -#ifdef RLIMIT_AS setrlimit (RLIMIT_AS, &rlim); -#endif + #ifdef RLIMIT_CPU setrlimit (RLIMIT_CPU, &rlim); #endif