[asterisk-commits] russell: trunk r164821 - /trunk/main/asterisk.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Dec 16 14:49:26 CST 2008


Author: russell
Date: Tue Dec 16 14:49:25 2008
New Revision: 164821

URL: http://svn.digium.com/view/asterisk?view=rev&rev=164821
Log:
Fix build issues on Linux after sysinfo related changes

Modified:
    trunk/main/asterisk.c

Modified: trunk/main/asterisk.c
URL: http://svn.digium.com/view/asterisk/trunk/main/asterisk.c?view=diff&rev=164821&r1=164820&r2=164821
==============================================================================
--- trunk/main/asterisk.c (original)
+++ trunk/main/asterisk.c Tue Dec 16 14:49:25 2008
@@ -538,7 +538,7 @@
 	ast_free(swdev);
 	return 1;
 }
-#elif defined(HAVE_SYSCTL)
+#elif defined(HAVE_SYSCTL) && !defined(HAVE_SYSINFO)
 static int swapmode(int *used, int *total)
 {
 	used = total = 0;
@@ -554,13 +554,13 @@
 	long uptime = 0;
 #if defined(HAVE_SYSINFO)
 	struct sysinfo sys_info;
-	sysinfo(&sys_info)
+	sysinfo(&sys_info);
 	uptime = sys_info.uptime/3600;
 	physmem = sys_info.totalram * sys_info.mem_unit;
 	freeram = (sys_info.freeram * sys_info.mem_unit) / 1024;
 	totalswap = (sys_info.totalswap * sys_info.mem_unit) / 1024;
 	freeswap = (sys_info.freeswap * sys_info.mem_unit) / 1024;
-	nprocs = sys_info.nprocs;
+	nprocs = sys_info.procs;
 #elif defined(HAVE_SYSCTL)
 	static int pageshift;
 	struct vmtotal vmtotal;




More information about the asterisk-commits mailing list