From: Stuart Henderson Date: Sat, 8 May 2021 15:12:39 +0000 (+0000) Subject: ifdef RLIMIT_AS in recently added check X-Git-Tag: release-1.13.2rc1~171^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cde6284a036b32a03cbd89d9c478a6273d2124e5;p=thirdparty%2Funbound.git ifdef RLIMIT_AS in recently added check Some OS still don't have RLIMIT_AS --- diff --git a/daemon/unbound.c b/daemon/unbound.c index b2bb526c0..78771dbdd 100644 --- a/daemon/unbound.c +++ b/daemon/unbound.c @@ -212,12 +212,14 @@ checkrlimits(struct config_file* cfg) } #endif +#ifdef RLIMIT_AS if(getrlimit(RLIMIT_AS, &rlim) == 0) { if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY && rlim.rlim_cur < (rlim_t)memsize_expect) { log_warn("the ulimit(max memory size) is smaller than the expected memory usage (added size of caches). %u < %u bytes", (unsigned)rlim.rlim_cur, (unsigned)memsize_expect); } } +#endif if(getrlimit(RLIMIT_DATA, &rlim) == 0) { if(rlim.rlim_cur != (rlim_t)RLIM_INFINITY && rlim.rlim_cur < memsize_expect) {