[asterisk-commits] file: trunk r72935 - /trunk/res/res_limit.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 2 15:27:29 CDT 2007


Author: file
Date: Mon Jul  2 15:27:28 2007
New Revision: 72935

URL: http://svn.digium.com/view/asterisk?view=rev&rev=72935
Log:
Fix building under Solaris.

Modified:
    trunk/res/res_limit.c

Modified: trunk/res/res_limit.c
URL: http://svn.digium.com/view/asterisk/trunk/res/res_limit.c?view=diff&rev=72935&r1=72934&r2=72935
==============================================================================
--- trunk/res/res_limit.c (original)
+++ trunk/res/res_limit.c Mon Jul  2 15:27:28 2007
@@ -54,8 +54,10 @@
 	{ RLIMIT_CORE, "-c", "core file size" },
 #ifdef RLIMIT_RSS
 	{ RLIMIT_RSS, "-m", "resident memory" },
+	{ RLIMIT_MEMLOCK, "-l", "amount of memory locked into RAM" },
+#endif
+#ifdef RLIMIT_NPROC
 	{ RLIMIT_NPROC, "-u", "number of processes" },
-	{ RLIMIT_MEMLOCK, "-l", "amount of memory locked into RAM" },
 #endif
 	{ RLIMIT_NOFILE, "-n", "number of file descriptors" },
 #ifdef VMEM_DEF
@@ -107,7 +109,11 @@
 
 		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;
 			}




More information about the asterisk-commits mailing list