From: Timo Sirainen Date: Wed, 27 Apr 2011 13:25:08 +0000 (+0300) Subject: i_getgr*(): OpenBSD workaround. X-Git-Tag: 2.0.13~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1b85e6aaaefffa0ac0add84713e6d15daa4e01bb;p=thirdparty%2Fdovecot%2Fcore.git i_getgr*(): OpenBSD workaround. --- diff --git a/src/lib/ipwd.c b/src/lib/ipwd.c index 64bea7dea3..2760e6195c 100644 --- a/src/lib/ipwd.c +++ b/src/lib/ipwd.c @@ -31,8 +31,12 @@ static void gr_init(void) long size; if (grbuf == NULL) { + /* OpenBSD (up to 4.8 at least) reports too low value in + sysconf() */ +#ifndef __OpenBSD__ size = sysconf(_SC_GETGR_R_SIZE_MAX); if (size < 0) +#endif size = DEFAULT_GRBUF_SIZE; grbuf_size = size;