Guard RLIMIT_MEMLOCK usage

This commit is contained in:
Tatsuhiro Tsujikawa 2021-10-29 21:39:17 +09:00
parent 3985957c4d
commit c20d175ff2
1 changed files with 2 additions and 0 deletions

View File

@ -3725,6 +3725,7 @@ int process_options(Config *config,
} }
} }
#ifdef RLIMIT_MEMLOCK
if (config->rlimit_memlock) { if (config->rlimit_memlock) {
struct rlimit lim = {static_cast<rlim_t>(config->rlimit_memlock), struct rlimit lim = {static_cast<rlim_t>(config->rlimit_memlock),
static_cast<rlim_t>(config->rlimit_memlock)}; static_cast<rlim_t>(config->rlimit_memlock)};
@ -3734,6 +3735,7 @@ int process_options(Config *config,
<< xsi_strerror(error, errbuf.data(), errbuf.size()); << xsi_strerror(error, errbuf.data(), errbuf.size());
} }
} }
#endif // RLIMIT_MEMLOCK
auto &fwdconf = config->http.forwarded; auto &fwdconf = config->http.forwarded;