From: kejun.zhou <dp583@stebjsxu0119.(none)>
Signed-off-by: kejun.zhou kejun.zhou@linaro.org --- cpuidle/cpuidle_killer.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/cpuidle/cpuidle_killer.c b/cpuidle/cpuidle_killer.c index 67a675e..c8910f4 100644 --- a/cpuidle/cpuidle_killer.c +++ b/cpuidle/cpuidle_killer.c @@ -2,7 +2,17 @@ #include <stdio.h> #include <stdlib.h> #include <unistd.h> +#ifndef ANDROID #include <sys/timex.h> +#else +// As of 4.0.4, Bionic doesn't provide the timex/adjtimex interface +// However, the kernel does... +#include <linux/timex.h> // for struct timex +#include <asm/unistd.h> // for __NR_adjtimex +static int adjtimex(struct timex *buf) { + return syscall(__NR_adjtimex, buf); +} +#endif #include <sys/types.h> #include <sys/wait.h> #include <sys/param.h>