diff options
author | raveit65 <[email protected]> | 2018-07-08 10:20:43 +0200 |
---|---|---|
committer | raveit65 <[email protected]> | 2018-07-10 11:50:06 +0200 |
commit | 0746a55cd53d806361ec7520220d79d37986788b (patch) | |
tree | 9c1bc54948a059a7c389ea63b97dea207dd3f69e | |
parent | 1a11a017d60cd28493423d9ca192a7be69b910a6 (diff) | |
download | mate-applets-0746a55cd53d806361ec7520220d79d37986788b.tar.bz2 mate-applets-0746a55cd53d806361ec7520220d79d37986788b.tar.xz |
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)) {
^~~~~~~~~~~~~~~~~~~~~~
```
-rw-r--r-- | cpufreq/src/cpufreq-monitor-libcpufreq.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cpufreq/src/cpufreq-monitor-libcpufreq.c b/cpufreq/src/cpufreq-monitor-libcpufreq.c index 228a8909..ed99aa40 100644 --- a/cpufreq/src/cpufreq-monitor-libcpufreq.c +++ b/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) { |