From: Niels Provos Date: Sat, 12 Nov 2005 19:04:17 +0000 (+0000) Subject: solaris kernel changes are not backwards compatible - how retarded. problem X-Git-Tag: release-2.0.1-alpha~762 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65644dfb80f4aa1b0501d300f015efeb3bd35dd7;p=libevent solaris kernel changes are not backwards compatible - how retarded. problem pointed out by: Geoffrey Giesemann svn:r185 --- diff --git a/epoll.c b/epoll.c index 9f1066d8..bdab078b 100644 --- a/epoll.c +++ b/epoll.c @@ -109,8 +109,14 @@ epoll_init(void) return (NULL); if (getrlimit(RLIMIT_NOFILE, &rl) == 0 && - rl.rlim_cur != RLIM_INFINITY) - nfiles = rl.rlim_cur; + rl.rlim_cur != RLIM_INFINITY) { + /* + * Solaris is somewhat retarded - it's important to drop + * backwards compatibility when making changes. So, don't + * dare to put rl.rlim_cur here. + */ + nfiles = rl.rlim_cur - 1; + } /* Initalize the kernel queue */