diff options
author | Mike Gabriel <[email protected]> | 2019-08-10 02:25:24 +0200 |
---|---|---|
committer | ZenWalker <[email protected]> | 2019-08-29 15:13:20 +0200 |
commit | 34d9b916fe4133457b7c2e7a00cd23f4f5b85114 (patch) | |
tree | 7da61c02ce44b53d9b1696f913dc8938c947facf /cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c | |
parent | e60a233bfb0b619be7cc8119bcebd40d7028efd5 (diff) | |
download | mate-applets-34d9b916fe4133457b7c2e7a00cd23f4f5b85114.tar.bz2 mate-applets-34d9b916fe4133457b7c2e7a00cd23f4f5b85114.tar.xz |
Make cpufreq builds independent from kernel header version.
Ported from gnome-applets, see
git diff e48b2d73~..5882df7f cpufreq/ configure.ac
on the gnome-applets repository.
Fixes mate-desktop/mate-applets#238.
Diffstat (limited to 'cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c')
-rw-r--r-- | cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c b/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c index f3d76e7e..d2fda2bf 100644 --- a/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c +++ b/cpufreq/src/cpufreq-selector/cpufreq-selector-libcpufreq.c @@ -19,6 +19,10 @@ * Authors : Carlos Garc�a Campos <[email protected]> */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include <glib.h> #include <glib/gstdio.h> #include <cpufreq.h> @@ -39,12 +43,12 @@ static gboolean cpufreq_selector_libcpufreq_set_governor (CPUFreqSelector G_DEFINE_TYPE (CPUFreqSelectorLibcpufreq, cpufreq_selector_libcpufreq, CPUFREQ_TYPE_SELECTOR) -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 1, 0) -typedef struct cpufreq_available_frequencies CPUFreqFrequencyList; -#else +#ifdef HAVE_GET_FREQUENCIES 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) +#else +typedef struct cpufreq_available_frequencies CPUFreqFrequencyList; #endif typedef struct cpufreq_policy CPUFreqPolicy; |