aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>2016-08-25 15:23:50 +0200
committerLisa Nguyen <lisa.nguyen@linaro.org>2016-09-15 14:05:18 -0700
commitebb4a02f7059c0fde7de853f2f9e25e955def5f5 (patch)
tree41086c90ffca3d68f51f18c30e1e920b5ea7bbc0
parent05710ec5032be4c8edafb4109d4d908d31243906 (diff)
downloadpm-qa-ebb4a02f7059c0fde7de853f2f9e25e955def5f5.tar.gz
Fix build with Bionic 7.x
Change-Id: I98a495a9b6750f1ff33b7a6c4c875481e2698070 Signed-off-by: Bernhard Rosenkränzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--cpuidle/cpuidle_killer.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/cpuidle/cpuidle_killer.c b/cpuidle/cpuidle_killer.c
index e0e81e8..6326afb 100644
--- a/cpuidle/cpuidle_killer.c
+++ b/cpuidle/cpuidle_killer.c
@@ -6,16 +6,19 @@
#include <sys/time.h>
#ifdef ANDROID
/*
-* As of 5.0.0, Bionic provides timex, but not the
+* Bionic prior to 7.0.0 provides timex, but not the
* adjtimex interface.
-* However, the kernel does.
+* Bionic 7.0.0 adds adjtimex, but there's no define
+* to check for it, so we rename and #define our
+* version to not get a symbol clash.
*/
#include <linux/timex.h> /* for struct timex */
#include <asm/unistd.h> /* for __NR_adjtimex */
-static int adjtimex(struct timex *buf)
+static int adj_timex(struct timex *buf)
{
return syscall(__NR_adjtimex, buf);
}
+#define adjtimex adj_timex
#endif
#include <sys/types.h>
#include <sys/wait.h>