From c3c36e92a53dfb9a4f34c0c8612750e2c32eeda1 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 30 May 2016 18:03:53 -0400 Subject: [PATCH] ndk_patches: Patch _PATH_BSHELL in paths.h Using /system/bin/sh does not work in all cases due to LD_LIBRARY_PATH, so patch paths.h to define _PATH_BSHELL to our own shell $PREFIX/bin/sh. --- ndk_patches/paths.h.patch | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/ndk_patches/paths.h.patch b/ndk_patches/paths.h.patch index 93cb2fa16..2d45efe98 100644 --- a/ndk_patches/paths.h.patch +++ b/ndk_patches/paths.h.patch @@ -1,6 +1,22 @@ -diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/paths.h ./usr/include/paths.h ---- /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/paths.h 2016-03-03 16:54:24.000000000 -0500 -+++ ./usr/include/paths.h 2016-04-11 03:56:22.460545708 -0400 +diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm64/usr/include/paths.h ./usr/include/paths.h +--- /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm64/usr/include/paths.h 2016-03-03 16:54:24.000000000 -0500 ++++ ./usr/include/paths.h 2016-05-30 17:18:24.726803678 -0400 +@@ -33,12 +33,12 @@ + #define _PATHS_H_ + + /* Default search path. */ +-#define _PATH_DEFPATH "/usr/bin:/bin" ++#define _PATH_DEFPATH "@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets" + /* All standard utilities path. */ + #define _PATH_STDPATH \ +- "/usr/bin:/bin:/usr/sbin:/sbin" ++ _PATH_DEFPATH + +-#define _PATH_BSHELL "/system/bin/sh" ++#define _PATH_BSHELL "@TERMUX_PREFIX@/bin/sh" + #define _PATH_CONSOLE "/dev/console" + #define _PATH_CSHELL "/bin/csh" + #define _PATH_DEVDB "/var/run/dev.db" @@ -66,9 +66,9 @@ /* Provide trailing slash, since mostly used for building pathnames. */