ndk_patches: Fix pwd.h patch to compile in more cases
authorFredrik Fornwall <fredrik@fornwall.net>
Fri, 31 Jul 2015 01:20:15 +0000 (21:20 -0400)
committerFredrik Fornwall <fredrik@fornwall.net>
Fri, 31 Jul 2015 01:20:15 +0000 (21:20 -0400)
ndk_patches/pwd.patch

index 2cd2cb8..bee01ee 100644 (file)
@@ -25,7 +25,7 @@ diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/incl
 +       char* result = realpath("@TERMUX_HOME@/.termux/shell", realpath_buffer);
 +       if (result == NULL || access(realpath_buffer, X_OK) == -1) {
 +              char const* bash_path = "@TERMUX_PREFIX@/bin/bash";
-+              if (access(bash_path, X_OK) != -1) pw->pw_shell = bash_path;
++              if (access(bash_path, X_OK) != -1) pw->pw_shell = (char*) bash_path;
 +              else pw->pw_shell = "@TERMUX_PREFIX@/bin/ash";
 +       } else {
 +               pw->pw_shell = realpath_buffer;