From c20d175ff2011dd71f348ff1d17c9d2e68663276 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Fri, 29 Oct 2021 21:39:17 +0900 Subject: [PATCH] Guard RLIMIT_MEMLOCK usage --- src/shrpx.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/shrpx.cc b/src/shrpx.cc index 14427f92..6d810ef4 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -3725,6 +3725,7 @@ int process_options(Config *config, } } +#ifdef RLIMIT_MEMLOCK if (config->rlimit_memlock) { struct rlimit lim = {static_cast(config->rlimit_memlock), static_cast(config->rlimit_memlock)}; @@ -3734,6 +3735,7 @@ int process_options(Config *config, << xsi_strerror(error, errbuf.data(), errbuf.size()); } } +#endif // RLIMIT_MEMLOCK auto &fwdconf = config->http.forwarded;