nghttpx: Cast configuration value to rlim_t to avoid compile error on 32bit

This commit is contained in:
Tatsuhiro Tsujikawa 2015-02-21 16:56:41 +09:00
parent 20a689ef44
commit a26a597453
1 changed files with 2 additions and 2 deletions

View File

@ -1911,8 +1911,8 @@ int main(int argc, char **argv) {
} }
if (get_config()->rlimit_nofile) { if (get_config()->rlimit_nofile) {
struct rlimit lim = {get_config()->rlimit_nofile, struct rlimit lim = {static_cast<rlim_t>(get_config()->rlimit_nofile),
get_config()->rlimit_nofile}; static_cast<rlim_t>(get_config()->rlimit_nofile)};
if (setrlimit(RLIMIT_NOFILE, &lim) != 0) { if (setrlimit(RLIMIT_NOFILE, &lim) != 0) {
auto error = errno; auto error = errno;
LOG(WARN) << "Setting rlimit-nofile failed: " << strerror(error); LOG(WARN) << "Setting rlimit-nofile failed: " << strerror(error);