aports/testing/thermald/ppc64le.patch
Breno Leitao 932f2160cb testing/thermald: fix FTBFS on ppc64le
Currently musl on ppc64le does not define cpuid.h. Avoiding including
and calling _cpuid.
2017-04-08 22:01:00 +00:00

37 lines
941 B
Diff

Author: Breno Leitao <breno.leitao@gmail.com>
Date: Sat Apr 8 21:31:07 2017 +0000
Enable the build on ppc64le Currently musl on ppc64le does not define
cpuid.h. Avoiding calling it.
Signed-off-by: Breno Leitao <breno.leitao@gmail.com>
--- a/src/thd_engine.cpp.old
+++ b/src/thd_engine.cpp
@@ -35,13 +35,15 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/utsname.h>
-#include <cpuid.h>
#include <locale>
#include "thd_engine.h"
#include "thd_cdev_therm_sys_fs.h"
#include "thd_zone_therm_sys_fs.h"
#include "thd_zone_dynamic.h"
#include "thd_cdev_gen_sysfs.h"
+#ifndef __powerpc__
+#include <cpuid.h>
+#endif
static void *cthd_engine_thread(void *arg);
@@ -603,7 +605,7 @@
};
int cthd_engine::check_cpu_id() {
-#ifndef ANDROID
+#if !defined(ANDROID) && !defined(__powerpc__)
// Copied from turbostat program
unsigned int ebx, ecx, edx, max_level;
unsigned int fms, family, model, stepping;