From 2ce2ebcdbad7907644ce3936547eafe881be8754 Mon Sep 17 00:00:00 2001 From: Martin Rehak Date: Tue, 2 Jun 2026 13:48:07 +0200 Subject: [PATCH] suricata: guard RLIMIT_NPROC usage Only use RLIMIT_NPROC when the platform exposes that resource limit constant. --- src/suricata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/suricata.c b/src/suricata.c index 263959c432..e6165b5f5f 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -3225,7 +3225,7 @@ void SuricataPostInit(void) #endif if (limit_nproc) { -#if defined(HAVE_SYS_RESOURCE_H) +#if defined(HAVE_SYS_RESOURCE_H) && defined(RLIMIT_NPROC) #ifdef linux if (geteuid() == 0) { SCLogWarning("setrlimit has no effect when running as root.");