summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinson Lee <vlee@freedesktop.org>2012-11-21 15:17:00 -0800
committerVinson Lee <vlee@freedesktop.org>2012-11-21 15:17:00 -0800
commit682737c5efe1b8b2da8060b1f39b01ae82e10534 (patch)
treecae15d9f2ead9c11118e539bc59c38fb41b8a8b4
parentcf47699087f74a6fd94c59a74837fc6c3c6422a8 (diff)
util: Do not use setrlimit/getrlimit if RLIMIT_AS is not defined.
OpenBSD is one platform that does not define the symbol RLIMIT_AS. Signed-off-by: Vinson Lee <vlee@freedesktop.org>
-rw-r--r--tests/util/piglit-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/util/piglit-util.c b/tests/util/piglit-util.c
index f412cb09..c061def9 100644
--- a/tests/util/piglit-util.c
+++ b/tests/util/piglit-util.c
@@ -195,7 +195,7 @@ char *strchrnul(const char *s, int c)
void
piglit_set_rlimit(unsigned long lim)
{
-#if defined(USE_SETRLIMIT)
+#if defined(USE_SETRLIMIT) && defined(RLIMIT_AS)
struct rlimit rl;
if (getrlimit(RLIMIT_AS, &rl) != -1) {
printf("Address space limit = %lu, max = %lu\n",