From 0746a55cd53d806361ec7520220d79d37986788b Mon Sep 17 00:00:00 2001 From: raveit65 Date: Sun, 8 Jul 2018 10:20:43 +0200 Subject: 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)) { ^~~~~~~~~~~~~~~~~~~~~~ ``` --- cpufreq/src/cpufreq-monitor-libcpufreq.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- cgit v1.2.1