From a26a597453dac102ce9b0325fc4dfed7fbad072f Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 21 Feb 2015 16:56:41 +0900 Subject: [PATCH] nghttpx: Cast configuration value to rlim_t to avoid compile error on 32bit --- src/shrpx.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shrpx.cc b/src/shrpx.cc index bbb9808e..4eee9795 100644 --- a/src/shrpx.cc +++ b/src/shrpx.cc @@ -1911,8 +1911,8 @@ int main(int argc, char **argv) { } if (get_config()->rlimit_nofile) { - struct rlimit lim = {get_config()->rlimit_nofile, - get_config()->rlimit_nofile}; + struct rlimit lim = {static_cast(get_config()->rlimit_nofile), + static_cast(get_config()->rlimit_nofile)}; if (setrlimit(RLIMIT_NOFILE, &lim) != 0) { auto error = errno; LOG(WARN) << "Setting rlimit-nofile failed: " << strerror(error);