diff options
Diffstat (limited to 'cpufreq/src/cpufreq-selector')
-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; |