Skip to content
Snippets Groups Projects
Commit 0f36e1ef authored by Joshua Colp's avatar Joshua Colp
Browse files

Fix building under Solaris.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72935 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent f6e3c125
No related branches found
No related tags found
No related merge requests found
...@@ -54,8 +54,10 @@ static struct limits { ...@@ -54,8 +54,10 @@ static struct limits {
{ RLIMIT_CORE, "-c", "core file size" }, { RLIMIT_CORE, "-c", "core file size" },
#ifdef RLIMIT_RSS #ifdef RLIMIT_RSS
{ RLIMIT_RSS, "-m", "resident memory" }, { RLIMIT_RSS, "-m", "resident memory" },
{ RLIMIT_NPROC, "-u", "number of processes" },
{ RLIMIT_MEMLOCK, "-l", "amount of memory locked into RAM" }, { RLIMIT_MEMLOCK, "-l", "amount of memory locked into RAM" },
#endif
#ifdef RLIMIT_NPROC
{ RLIMIT_NPROC, "-u", "number of processes" },
#endif #endif
{ RLIMIT_NOFILE, "-n", "number of file descriptors" }, { RLIMIT_NOFILE, "-n", "number of file descriptors" },
#ifdef VMEM_DEF #ifdef VMEM_DEF
...@@ -107,7 +109,11 @@ static int my_ulimit(int fd, int argc, char **argv) ...@@ -107,7 +109,11 @@ static int my_ulimit(int fd, int argc, char **argv)
if (argc == 3) { if (argc == 3) {
int x; int x;
#ifdef RLIMIT_NPROC
if (resource != RLIMIT_NOFILE && resource != RLIMIT_CORE && resource != RLIMIT_NPROC && resource != RLIMIT_FSIZE) { 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"); ast_cli(fd, "Resource not permitted to be set\n");
return RESULT_FAILURE; return RESULT_FAILURE;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment