{ RLIMIT_CORE, "-c", "core file size" },
#ifdef RLIMIT_RSS
{ RLIMIT_RSS, "-m", "resident memory" },
- { RLIMIT_NPROC, "-u", "number of processes" },
{ RLIMIT_MEMLOCK, "-l", "amount of memory locked into RAM" },
+#endif
+#ifdef RLIMIT_NPROC
+ { RLIMIT_NPROC, "-u", "number of processes" },
#endif
{ RLIMIT_NOFILE, "-n", "number of file descriptors" },
#ifdef VMEM_DEF
if (argc == 3) {
int x;
+#ifdef RLIMIT_NPROC
if (resource != RLIMIT_NOFILE && resource != RLIMIT_CORE && resource != RLIMIT_NPROC && resource != RLIMIT_FSIZE) {
+#else
+ if (resource != RLIMIT_NOFILE && resource != RLIMIT_CORE && resource != RLIMIT_FSIZE) {
+#endif
ast_cli(fd, "Resource not permitted to be set\n");
return RESULT_FAILURE;
}