Fix LLVM build on NetBSD. Patch by Neil Booth.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37410 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2007-06-04 15:28:57 +00:00
parent b6665f62c5
commit 69bdf68fe6

View 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