From 24533e3656a71d0dd003a745569bd387bcd6d63a Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:15:26 +0800 Subject: [PATCH 1/2] toolchain: add API guard for `timezone_t` --- ndk-patches/27/time.h.patch | 18 ++++++++++++++++++ scripts/build/termux_step_setup_toolchain.sh | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 ndk-patches/27/time.h.patch diff --git a/ndk-patches/27/time.h.patch b/ndk-patches/27/time.h.patch new file mode 100644 index 00000000000000..489f5c0b9186b2 --- /dev/null +++ b/ndk-patches/27/time.h.patch @@ -0,0 +1,18 @@ +--- a/usr/include/time.h ++++ b/usr/include/time.h +@@ -39,6 +39,7 @@ + + __BEGIN_DECLS + ++#if __ANDROID_API__ >= 35 + /* If we just use void* in the typedef, the compiler exposes that in error messages. */ + struct __timezone_t; + +@@ -50,6 +51,7 @@ + * to remove the pointer. + */ + typedef struct __timezone_t* timezone_t; ++#endif + + /** Divisor to compute seconds from the result of a call to clock(). */ + #define CLOCKS_PER_SEC 1000000 diff --git a/scripts/build/termux_step_setup_toolchain.sh b/scripts/build/termux_step_setup_toolchain.sh index f46527340c82d0..6d1301b7487230 100644 --- a/scripts/build/termux_step_setup_toolchain.sh +++ b/scripts/build/termux_step_setup_toolchain.sh @@ -7,7 +7,7 @@ termux_step_setup_toolchain() { # toolchain setup to ensure that everyone gets an updated # toolchain if [ "${TERMUX_NDK_VERSION}" = "27" ]; then - TERMUX_STANDALONE_TOOLCHAIN+="-v0" + TERMUX_STANDALONE_TOOLCHAIN+="-v1" termux_setup_toolchain_27 elif [ "${TERMUX_NDK_VERSION}" = 23c ]; then TERMUX_STANDALONE_TOOLCHAIN+="-v8" From 0e7a7c303a75864900cb6b7821a23fcae8a0446b Mon Sep 17 00:00:00 2001 From: Chongyun Lee <45286352+licy183@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:15:45 +0800 Subject: [PATCH 2/2] coreutils: revbump to rebuild --- packages/coreutils/build.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/coreutils/build.sh b/packages/coreutils/build.sh index e226caf18509fa..8a72a983a233f0 100644 --- a/packages/coreutils/build.sh +++ b/packages/coreutils/build.sh @@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Basic file, shell and text manipulation utilities from t TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_MAINTAINER="@termux" TERMUX_PKG_VERSION=9.5 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/coreutils/coreutils-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=cd328edeac92f6a665de9f323c93b712af1858bc2e0d88f3f7100469470a1b8a TERMUX_PKG_DEPENDS="libandroid-support, libgmp, libiconv"