Don't test RLIMIT_RSS and RLIMIT_NPROC if not supported
authorDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Wed, 13 Aug 2008 18:43:58 +0000 (14:43 -0400)
committerDavid Bartley <dtbartle@csclub.uwaterloo.ca>
Wed, 13 Aug 2008 18:47:36 +0000 (14:47 -0400)
resource/tst-getrlimit.c

index 6748034..9668412 100644 (file)
@@ -21,8 +21,12 @@ static struct
     { "RLIMIT_AS", RLIMIT_AS, true },
     /* The following are traditional Unix limits which are also
        expected (by us).  */
+#ifdef RLIMIT_RSS
     { "RLIMIT_RSS", RLIMIT_RSS, true },
+#endif
+#ifdef RLIMIT_NPROC
     { "RLIMIT_NPROC", RLIMIT_NPROC, true },
+#endif
     /* The following are extensions.  */
 #ifdef RLIMIT_MEMLOCK
     { "RLIMIT_MEMLOCK", RLIMIT_MEMLOCK, false },