commit 60dfdd9b154ed694a1eee202393b5eb6f664c03d
parent 5970836af8868fc3460b04d278169929241ab243
Author: Nick Mathewson <nickm@torproject.org>
Date: Wed, 17 Jan 2018 09:07:50 -0500
Merge branch 'bug21074_029'
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/compat.c b/src/common/compat.c
@@ -1747,7 +1747,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
if (errno == EINVAL && try_limit < (uint64_t) rlim.rlim_cur) {
/* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies. I'm looking at you, OSX 10.5.... */
- rlim.rlim_cur = MIN(try_limit, rlim.rlim_cur);
+ rlim.rlim_cur = MIN((rlim_t) try_limit, rlim.rlim_cur);
if (setrlimit(RLIMIT_NOFILE, &rlim) == 0) {
if (rlim.rlim_cur < (rlim_t)limit) {
log_warn(LD_CONFIG, "We are limited to %lu file descriptors by "