Commit c20d175f authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Guard RLIMIT_MEMLOCK usage

parent 3985957c
...@@ -3725,6 +3725,7 @@ int process_options(Config *config, ...@@ -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, ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment