Fix LLVM build on NetBSD. Patch by Neil Booth.

llvm-svn: 37410
This commit is contained in:
Devang Patel 2007-06-04 15:28:57 +00:00
parent 312b723af2
commit d609374ab3
1 changed files with 2 additions and 0 deletions

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