[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[or-cvs] r12394: Fix compile on sparc64 (in tor/trunk: . src/common)
Author: nickm
Date: 2007-11-06 09:19:14 -0500 (Tue, 06 Nov 2007)
New Revision: 12394
Modified:
tor/trunk/
tor/trunk/src/common/compat.c
Log:
r16450@catbus: nickm | 2007-11-06 09:18:11 -0500
Fix compile on sparc64
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r16450] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/common/compat.c
===================================================================
--- tor/trunk/src/common/compat.c 2007-11-06 13:39:09 UTC (rev 12393)
+++ tor/trunk/src/common/compat.c 2007-11-06 14:19:14 UTC (rev 12394)
@@ -708,7 +708,7 @@
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 @@
* 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);