From 891d8dbeddc644d3821c1a0df4559eda5f20827b Mon Sep 17 00:00:00 2001 From: Alejandro Colomar Date: Fri, 2 Dec 2022 22:52:52 +0100 Subject: [PATCH] Assume RLIMIT_CPU 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 | 2 -- 2 files changed, 4 deletions(-) diff --git a/libmisc/limits.c b/libmisc/limits.c index bdee60a6..22f85043 100644 --- a/libmisc/limits.c +++ b/libmisc/limits.c @@ -318,13 +318,11 @@ static int do_user_limits (const char *buf, const char *name) retval |= setrlimit_value (RLIMIT_STACK, pp, 1024); break; #endif -#ifdef RLIMIT_CPU case 't': case 'T': /* RLIMIT_CPU - max CPU time (MIN) */ retval |= setrlimit_value (RLIMIT_CPU, pp, 60); break; -#endif #ifdef RLIMIT_NPROC case 'u': case 'U': diff --git a/libmisc/pwd_init.c b/libmisc/pwd_init.c index 439361ac..b8980c70 100644 --- a/libmisc/pwd_init.c +++ b/libmisc/pwd_init.c @@ -34,9 +34,7 @@ void pwd_init (void) rlim.rlim_cur = rlim.rlim_max = RLIM_INFINITY; setrlimit (RLIMIT_AS, &rlim); -#ifdef RLIMIT_CPU setrlimit (RLIMIT_CPU, &rlim); -#endif #ifdef RLIMIT_DATA setrlimit (RLIMIT_DATA, &rlim); #endif