[dovecot] RLIMIT_AS patch for FreeBSD

Dominic Marks dom at cus.org.uk
Fri Dec 27 20:31:21 EET 2002


I've just updated the FreeBSD dovecot port to the 0.99.4 beta release,
the following patch was needed as FreeBSD has setrlimit(2) but does not
define RLIMIT_AS (I believe). I switched the code the require both,
alternatively find a parallel option in the FreeBSD setrlimit(2) manual
page. ( http://www.freebsd.org/cgi/man.cgi?setrlimit )

You may be interested in integrating this patch.

--- src/lib/restrict-process-size.c	Fri Dec 27 18:19:41 2002
+++ src/lib/restrict-process-size.c-new	Fri Dec 27 18:19:22 2002
@@ -32,7 +32,8 @@
 void restrict_process_size(unsigned int size __attr_unused__)
+#if defined(HAVE_SETRLIMIT) && defined(RLIMIT_AS)
+/* FreeBSD has setrlimit(2) but does not define RLIMIT_AS */
 	struct rlimit rlim;
 	rlim.rlim_max = rlim.rlim_cur =

 <dom at cus.org.uk> <d.marks at student.umist.ac.uk>

More information about the dovecot mailing list