From: Fredrik Fornwall Date: Mon, 19 Oct 2015 21:51:13 +0000 (-0400) Subject: Patch NDK to define AT_EACCESS to 0 X-Git-Url: https://git.distorted.org.uk/~mdw/termux-packages/commitdiff_plain/629f805ba112da335a7f9fadd78d90b177941513?hp=b4b35f2f10d8e226145f6cc0e0c46c6d7e12c17f Patch NDK to define AT_EACCESS to 0 This fixes breakage for gnulib-using packages which otherwise defines AT_EACCESS, which does not work on Android 6. Bump build revisions for coreutils and emacs to rebuild them with this patch. --- diff --git a/ndk_patches/linux-fcntl.h.patch b/ndk_patches/linux-fcntl.h.patch new file mode 100644 index 00000000..b7070cd9 --- /dev/null +++ b/ndk_patches/linux-fcntl.h.patch @@ -0,0 +1,18 @@ +diff -u -r /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/linux/fcntl.h ./usr/include/linux/fcntl.h +--- /home/fornwall/lib/android-ndk/platforms/android-21/arch-arm/usr/include/linux/fcntl.h 2014-10-14 22:53:49.000000000 -0400 ++++ ./usr/include/linux/fcntl.h 2015-10-19 17:17:56.309373308 -0400 +@@ -41,6 +41,14 @@ + #define AT_SYMLINK_NOFOLLOW 0x100 + #define AT_REMOVEDIR 0x200 + /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ ++ ++/* Termux patch: This flag is not supported on Android 6.0+, and should not ++ be needed since there are not setuid binaries. Define AT_EACCESS to 0 to ++ avoid packages defining their own AT_EACCESS (which e.g. coreutil does) ++ since that will only result in errors. See: ++ https://android.googlesource.com/platform/bionic/+/3577825%5E!/ */ ++#define AT_EACCESS 0 ++ + #define AT_SYMLINK_FOLLOW 0x400 + #define AT_NO_AUTOMOUNT 0x800 + #define AT_EMPTY_PATH 0x1000 diff --git a/packages/coreutils/build.sh b/packages/coreutils/build.sh index cda76fd7..56385c18 100755 --- a/packages/coreutils/build.sh +++ b/packages/coreutils/build.sh @@ -1,7 +1,7 @@ TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/coreutils/ TERMUX_PKG_DESCRIPTION="Basic file, shell and text manipulation utilities from the GNU project" TERMUX_PKG_VERSION=8.24 -TERMUX_PKG_BUILD_REVISION=2 +TERMUX_PKG_BUILD_REVISION=3 TERMUX_PKG_SRCURL=http://ftp.gnu.org/gnu/coreutils/coreutils-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_EXTRA_CONFIGURE_ARGS="ac_cv_func_mkfifo=yes gl_cv_host_operating_system=Android --without-gmp --enable-single-binary=symlinks ac_cv_func_endpwent=no" # pinky has no usage on Android. realpath has permission denied problem with relative paths, diff --git a/packages/emacs/build.sh b/packages/emacs/build.sh index 7d7c2ee4..0118cfd5 100644 --- a/packages/emacs/build.sh +++ b/packages/emacs/build.sh @@ -1,7 +1,7 @@ TERMUX_PKG_HOMEPAGE=http://www.gnu.org/software/emacs/ TERMUX_PKG_DESCRIPTION="Extensible, customizable text editor-and more" TERMUX_PKG_VERSION=24.5 -TERMUX_PKG_BUILD_REVISION=1 +TERMUX_PKG_BUILD_REVISION=2 TERMUX_PKG_SRCURL=http://ftp.gnu.org/pub/gnu/emacs/emacs-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_DEPENDS="ncurses" TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--without-x --with-xpm=no --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no --without-gconf --without-gsettings --without-all"