Skip to content

Commit 0746a55

Browse files
author
raveit65
committed
cpufreq: fix a -Wimplicit-function-declaration
happens if build with -lcpupower and kernel 4.7+ ``` cpufreq-monitor-libcpufreq.c: In function 'cpufreq_monitor_libcpufreq_run': cpufreq-monitor-libcpufreq.c:117:7: warning: implicit declaration of function 'cpupower_is_cpu_online' [-Wimplicit-function-declaration] if (cpupower_is_cpu_online (cpu)) { ^~~~~~~~~~~~~~~~~~~~~~ ```
1 parent 1a11a01 commit 0746a55

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cpufreq/src/cpufreq-monitor-libcpufreq.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ cpufreq_monitor_libcpufreq_new (guint cpu)
9898
return CPUFREQ_MONITOR (monitor);
9999
}
100100

101+
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 7, 0)
102+
extern int cpupower_is_cpu_online (unsigned int cpu);
103+
#endif
104+
101105
static gboolean
102106
cpufreq_monitor_libcpufreq_run (CPUFreqMonitor *monitor)
103107
{

0 commit comments

Comments
 (0)