1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-18 02:55:12 +00:00

freebsd patch from mirrorbox

git-svn-id: https://conky.svn.sourceforge.net/svnroot/conky/trunk/conky1@586 7f574dfc-610e-0410-a909-a81674777703
This commit is contained in:
Brenden Matthews 2006-03-12 23:26:12 +00:00
parent 794e6a38e1
commit e2da4c5118

View File

@ -273,8 +273,18 @@ void get_cpu_count()
{
int cpu_count = 0;
/* XXX
* FreeBSD doesn't allow to get per CPU load stats
* on SMP machines. It's possible to get a CPU count,
* but as we fulfil only info.cpu_usage[0], it's better
* to report there's only one CPU. It should fix some bugs
* (e.g. cpugraph)
*/
#if 0
if (GETSYSCTL("hw.ncpu", cpu_count) == 0)
info.cpu_count = cpu_count;
#endif
info.cpu_count = 1;
info.cpu_usage = malloc(info.cpu_count * sizeof(float));
if (info.cpu_usage == NULL)