Skip to content
Permalink
Browse files

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)) {
       ^~~~~~~~~~~~~~~~~~~~~~
```
  • Loading branch information...
raveit65 committed Jul 8, 2018
1 parent 1a11a01 commit 0746a55cd53d806361ec7520220d79d37986788b
Showing with 4 additions and 0 deletions.
  1. +4 −0 cpufreq/src/cpufreq-monitor-libcpufreq.c
@@ -98,6 +98,10 @@ cpufreq_monitor_libcpufreq_new (guint cpu)
return CPUFREQ_MONITOR (monitor);
}

#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 7, 0)
extern int cpupower_is_cpu_online (unsigned int cpu);
#endif

static gboolean
cpufreq_monitor_libcpufreq_run (CPUFreqMonitor *monitor)
{

0 comments on commit 0746a55

Please sign in to comment.
You can’t perform that action at this time.