Dear Maintainer,
it seems like previous versions just optimized the call to
cpufreq_cpu_exists away? The current build relies to have the
symbol external defined.
Attached patch tries to query the number of CPUs from another
function and (kind of ugly) avoids a later crash if frequencies
could not be queried.
Therefore and because the last upstream version is from 2006
one might ask if this package is really still useful?
(At least on amd64?)
Kind regards,
Bernhard
Description: Get number of CPUs
Author: Bernhard Übelacker
Bug-Debian: https://bugs.debian.org/966638
Forwarded: no
Last-Update: 2020-10-16
Index: gkrellm2-cpufreq-0.6.4/cpufreq.c
===
--- gkrellm2-cpufreq-0.6.4.orig/cpufreq.c
+++ gkrellm2-cpufreq-0.6.4/cpufreq.c
@@ -49,6 +49,7 @@
#include
#include
+#include
/* version number */
#define VERSION"0.6.4"
@@ -616,8 +617,7 @@ GkrellmMonitor* gkrellm_init_plugin(void
monitor = _mon;
/* determine number of cpus */
- for( ncpu = 0; cpufreq_cpu_exists(ncpu)==0; ++ncpu )
-;
+ ncpu = get_nprocs();
ncpu = ncpu > NCPU_MAX ? NCPU_MAX : ncpu;
/* determine maximal frequency */
@@ -625,7 +625,10 @@ GkrellmMonitor* gkrellm_init_plugin(void
for ( cpu = 0; cpu