diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-08-21 18:42:08 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-08-21 18:42:19 -0300 |
commit | 5ce0757f264bcd7d0c8941f48e1d9b473aa83844 (patch) | |
tree | cb7020a570b16dbdae9c8e4e37f3a8f8e94a3201 /testing/thermald/ppc64le.patch | |
parent | 7263420356bf6a26dd7975e5613ae7cf9b3a888e (diff) | |
download | aports-5ce0757f264bcd7d0c8941f48e1d9b473aa83844.tar.bz2 aports-5ce0757f264bcd7d0c8941f48e1d9b473aa83844.tar.xz |
testing/thermald: fix ppc64le build
Diffstat (limited to 'testing/thermald/ppc64le.patch')
-rw-r--r-- | testing/thermald/ppc64le.patch | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/testing/thermald/ppc64le.patch b/testing/thermald/ppc64le.patch index 537f1503b6..52ca3adcaf 100644 --- a/testing/thermald/ppc64le.patch +++ b/testing/thermald/ppc64le.patch @@ -1,5 +1,5 @@ diff --git a/src/thd_engine.cpp b/src/thd_engine.cpp -index 82882dd..6efd7cb 100644 +index 82882dd..64e4db2 100644 --- a/src/thd_engine.cpp +++ b/src/thd_engine.cpp @@ -35,7 +35,9 @@ @@ -12,4 +12,35 @@ index 82882dd..6efd7cb 100644 #include <locale> #include "thd_engine.h" #include "thd_cdev_therm_sys_fs.h" +@@ -664,7 +666,7 @@ static supported_ids_t id_table[] = { + #endif + + int cthd_engine::check_cpu_id() { +-#ifndef ANDROID ++#ifndef ANDROID && !defined(__powerpc__) + // Copied from turbostat program + unsigned int ebx, ecx, edx, max_level; + unsigned int fms, family, model, stepping; +diff --git a/src/thd_engine_default.cpp b/src/thd_engine_default.cpp +index 3454170..e75fdaf 100644 +--- a/src/thd_engine_default.cpp ++++ b/src/thd_engine_default.cpp +@@ -795,14 +795,16 @@ void cthd_engine_default::workarounds() + } + + #ifndef ANDROID ++#ifndef __powerpc__ + #include <cpuid.h> ++#endif + #include <sys/mman.h> + #define BIT_ULL(nr) (1ULL << (nr)) + #endif + + void cthd_engine_default::workaround_rapl_mmio_power(void) + { +-#ifndef ANDROID ++#ifndef ANDROID && !defined(__powerpc__) + int map_fd; + void *rapl_mem; + unsigned char *rapl_pkg_pwr_addr; |