Fix LLVM build on NetBSD. Patch by Neil Booth.
authorDevang Patel <dpatel@apple.com>
Mon, 4 Jun 2007 15:28:57 +0000 (15:28 +0000)
committerDevang Patel <dpatel@apple.com>
Mon, 4 Jun 2007 15:28:57 +0000 (15:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37410 91177308-0d34-0410-b5e6-96231b3b80d8

lib/System/Unix/Program.inc

index 1fe25861e1e74fe5851f7fb2caf826e2b2341a3c..4da1c73fbd1f4f45bfc81986714dfd9a55eb34c1 100644 (file)
@@ -125,11 +125,13 @@ static void SetMemoryLimits (unsigned size)
   r.rlim_cur = limit;
   setrlimit (RLIMIT_RSS, &r);
 #endif
+#ifdef RLIMIT_AS  // e.g. NetBSD doesn't have it.
   // Virtual memory.
   getrlimit (RLIMIT_AS, &r);
   r.rlim_cur = limit;
   setrlimit (RLIMIT_AS, &r);
 #endif
+#endif
 }
 
 int