Browse Source

ndk_patches: Fix pwd.h patch to compile in more cases

android-5
Fredrik Fornwall 10 years ago
parent
commit
341654304c
  1. 2
      ndk_patches/pwd.patch

2
ndk_patches/pwd.patch

@ -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;

Loading…
Cancel
Save