diff options
author | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-02 20:27:28 +0000 |
---|---|---|
committer | file <file@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-07-02 20:27:28 +0000 |
commit | 4d62daefc9d21b2b7a0f8c358d26f6ed93c67372 (patch) | |
tree | c3e37ef1c6f26d58f87c591bc6a2f23f1ccf80d6 /res/res_limit.c | |
parent | 5870839240b044293186b40827bac0b45e9af93d (diff) |
Fix building under Solaris.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72935 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_limit.c')
-rw-r--r-- | res/res_limit.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/res/res_limit.c b/res/res_limit.c index 045f8db69..d8fe8513a 100644 --- a/res/res_limit.c +++ b/res/res_limit.c @@ -54,9 +54,11 @@ static struct limits { { 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 { VMEM_DEF, "-v", "virtual memory" }, @@ -107,7 +109,11 @@ static int my_ulimit(int fd, int argc, char **argv) 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; } |