summaryrefslogtreecommitdiff
path: root/cpufreq/src/cpufreq-monitor-libcpufreq.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2019-05-09 17:36:08 +0200
committerraveit65 <[email protected]>2019-05-16 08:39:57 +0200
commite085328f56f2fa9aac2b26cb49ec143877968f19 (patch)
treed95542e796423b960bf38b561595b93e55e59024 /cpufreq/src/cpufreq-monitor-libcpufreq.c
parentf5d5328b77a1eaa6fe42fb038b4a16a11c5fe6a8 (diff)
downloadmate-applets-e085328f56f2fa9aac2b26cb49ec143877968f19.tar.bz2
mate-applets-e085328f56f2fa9aac2b26cb49ec143877968f19.tar.xz
cpufreq: support kernel 5.1.0
Diffstat (limited to 'cpufreq/src/cpufreq-monitor-libcpufreq.c')
-rw-r--r--cpufreq/src/cpufreq-monitor-libcpufreq.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpufreq/src/cpufreq-monitor-libcpufreq.c b/cpufreq/src/cpufreq-monitor-libcpufreq.c
index ed99aa40..9821f2da 100644
--- a/cpufreq/src/cpufreq-monitor-libcpufreq.c
+++ b/cpufreq/src/cpufreq-monitor-libcpufreq.c
@@ -36,8 +36,15 @@ static GList *cpufreq_monitor_libcpufreq_get_available_governors (CPUFreqMon
G_DEFINE_TYPE (CPUFreqMonitorLibcpufreq, cpufreq_monitor_libcpufreq, CPUFREQ_TYPE_MONITOR)
-typedef struct cpufreq_policy CPUFreqPolicy;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0)
typedef struct cpufreq_available_frequencies CPUFreqFrequencyList;
+#else
+typedef struct cpufreq_frequencies CPUFreqFrequencyList;
+#define cpufreq_get_available_frequencies(cpu) cpufreq_get_frequencies ("available", cpu)
+#define cpufreq_put_available_frequencies(first) cpufreq_put_frequencies (first)
+#endif
+
+typedef struct cpufreq_policy CPUFreqPolicy;
typedef struct cpufreq_available_governors CPUFreqGovernorList;
static void