diff options
author | Nick Mathewson <nickm@torproject.org> | 2007-11-06 14:19:14 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2007-11-06 14:19:14 +0000 |
commit | 512d3b161c5abdbfa9b9d10b852c97baec418449 (patch) | |
tree | 02146649b823cf6baa8ed26d8ddb8224b4f8778f | |
parent | 95c7b8cc641ad275ebb5f445760f27a7ea937075 (diff) | |
download | tor-512d3b161c5abdbfa9b9d10b852c97baec418449.tar.gz tor-512d3b161c5abdbfa9b9d10b852c97baec418449.zip |
r16450@catbus: nickm | 2007-11-06 09:18:11 -0500
Fix compile on sparc64
svn:r12394
-rw-r--r-- | src/common/compat.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index e556257a64..6a5d2abba6 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -708,7 +708,7 @@ set_max_file_descriptors(unsigned long limit, unsigned long cap) return -1; } most = rlim.rlim_max > (rlim_t)cap ? (rlim_t)cap : rlim.rlim_max; - if (most > (unsigned long)rlim.rlim_cur) { + if ((rlim_t)most > rlim.rlim_cur) { log_info(LD_NET,"Raising max file descriptors from %lu to %lu.", (unsigned long)rlim.rlim_cur, (unsigned long)most); } @@ -722,7 +722,7 @@ set_max_file_descriptors(unsigned long limit, unsigned long cap) * full of nasty lies. I'm looking at you, OSX 10.5.... */ rlim.rlim_cur = OPEN_MAX; if (setrlimit(RLIMIT_NOFILE, &rlim) == 0) { - if (rlim.rlim_cur < limit) { + if (rlim.rlim_cur < (rlim_t)limit) { log_warn(LD_CONFIG, "We are limited to %lu file descriptors by " "OPEN_MAX, and ConnLimit is %lu. Changing ConnLimit; sorry.", (unsigned long)OPEN_MAX, limit); |