Skip to content

Commit

Permalink
cpufreq: fix a -Wimplicit-function-declaration
Browse files Browse the repository at this point in the history
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 10, 2018
1 parent 1a11a01 commit 0746a55
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cpufreq/src/cpufreq-monitor-libcpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 0746a55

Please sign in to comment.