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:51 -0700
commit9b626ef66f3375dfefd630c6f082ba5fb89cf3c9 (patch)
tree41086c90ffca3d68f51f18c30e1e920b5ea7bbc0
parentb90c38df7fc41efae47bee9d4354dd5e5d9ea076 (diff)
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>