$NetBSD: patch-af,v 1.1 2008/07/27 04:06:00 schmonz Exp $

--- runfilter.cc.orig	2008-07-16 00:42:17.000000000 -0400
+++ runfilter.cc
@@ -39,6 +39,7 @@
 #ifdef HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
 #endif
+#include <signal.h>
 #include "safeunistd.h"
 
 #include "freemem.h"
@@ -94,7 +95,9 @@ stdout_to_string(const string &cmd)
 	if (mem > 0) {
 	    mem = (mem / 8) * 7;
 	    struct rlimit ram_limit = { mem, RLIM_INFINITY } ;
+#ifdef HAVE_RLIMIT_AS
 	    setrlimit(RLIMIT_AS, &ram_limit);
+#endif
 	}
 
 	execl("/bin/sh", "/bin/sh", "-c", cmd.c_str(), (void*)NULL);
