From 8aa86e32b45d7c7567723d98d07aa4e507478bc0 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Mon, 7 Aug 2017 22:53:43 +0200 Subject: [PATCH] Update from NDK version used from r15b to r15c The docker image has been updated - run scripts/update-docker.sh --- build-package.sh | 2 +- ndk-patches/sys-cdefs.h.patch | 23 ++++++++++------------- scripts/setup-android-sdk.sh | 2 +- 3 files changed, 12 insertions(+), 15 deletions(-) diff --git a/build-package.sh b/build-package.sh index 3f779d853..1628c41ea 100755 --- a/build-package.sh +++ b/build-package.sh @@ -255,7 +255,7 @@ termux_step_setup_variables() { : "${TERMUX_DEBUG:=""}" : "${TERMUX_PKG_API_LEVEL:="21"}" : "${TERMUX_ANDROID_BUILD_TOOLS_VERSION:="25.0.3"}" - : "${TERMUX_NDK_VERSION:="15.1"}" + : "${TERMUX_NDK_VERSION:="15.2"}" if [ "x86_64" = "$TERMUX_ARCH" ] || [ "aarch64" = "$TERMUX_ARCH" ]; then TERMUX_ARCH_BITS=64 diff --git a/ndk-patches/sys-cdefs.h.patch b/ndk-patches/sys-cdefs.h.patch index 73c1e9d4e..716453741 100644 --- a/ndk-patches/sys-cdefs.h.patch +++ b/ndk-patches/sys-cdefs.h.patch @@ -1,19 +1,16 @@ diff -u -r /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/cdefs.h ./usr/include/sys/cdefs.h ---- /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/cdefs.h 2017-06-20 17:41:56.000000000 +0200 -+++ ./usr/include/sys/cdefs.h 2017-07-09 23:37:26.453911992 +0200 -@@ -237,9 +237,15 @@ +--- /home/fornwall/lib/android-ndk/sysroot/usr/include/sys/cdefs.h 2017-07-21 11:04:10.000000000 +0200 ++++ ./usr/include/sys/cdefs.h 2017-08-07 22:50:14.093361547 +0200 +@@ -235,7 +235,11 @@ + #endif + /* _FILE_OFFSET_BITS 64 support. */ - #if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) - #if _FILE_OFFSET_BITS == 64 -+#ifdef TERMUX_EXPOSE_FILE_OFFSET64 -+/* Using _FILE_OFFSET_BITS=64 does not work very well on Android +-#if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 ++/* Using _FILE_OFFSET_BITS=64 does not work well on Android + * and can cause problems when mixing libraries, which is why + * Termux hides away this unless TERMUX_EXPOSE_FILE_OFFSET64 + * is defined. */ ++#if !defined(__LP64__) && defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && defined(TERMUX_EXPOSE_FILE_OFFSET64) #define __USE_FILE_OFFSET64 1 - #endif - #endif -+#endif - - #define __BIONIC__ 1 - #include + #define __RENAME_IF_FILE_OFFSET64(func) __RENAME(func) + #else diff --git a/scripts/setup-android-sdk.sh b/scripts/setup-android-sdk.sh index 283f635c9..4e0ddc8ab 100755 --- a/scripts/setup-android-sdk.sh +++ b/scripts/setup-android-sdk.sh @@ -25,7 +25,7 @@ if [ ! -d $NDK ]; then mkdir -p $NDK cd $NDK/.. rm -Rf `basename $NDK` - NDK_VERSION=r15b + NDK_VERSION=r15c curl --fail --retry 3 -o ndk.zip \ http://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-`uname`-x86_64.zip