diff options
Diffstat (limited to 'meta-oe/recipes-devtools/android-tools/android-tools/reboot-syscall.patch')
-rw-r--r-- | meta-oe/recipes-devtools/android-tools/android-tools/reboot-syscall.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/android-tools/android-tools/reboot-syscall.patch b/meta-oe/recipes-devtools/android-tools/android-tools/reboot-syscall.patch new file mode 100644 index 0000000000..005541632a --- /dev/null +++ b/meta-oe/recipes-devtools/android-tools/android-tools/reboot-syscall.patch @@ -0,0 +1,25 @@ +Subject: port android_reboot() to call the reboot syscall via syscall() (glibc) rather than __reboot (bionic) +Author: Loïc Minier <loic.minier@ubuntu.com> + +--- a/core/libcutils/android_reboot.c ++++ b/core/libcutils/android_reboot.c +@@ -21,6 +21,8 @@ + #include <fcntl.h> + #include <stdio.h> + #include <string.h> ++#include <linux/reboot.h> ++#include <sys/syscall.h> + + #include <cutils/android_reboot.h> + +@@ -121,8 +123,8 @@ + break; + + case ANDROID_RB_RESTART2: +- ret = __reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, +- LINUX_REBOOT_CMD_RESTART2, arg); ++ ret = syscall(SYS_reboot, LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, ++ LINUX_REBOOT_CMD_RESTART2, arg); + break; + + default: |