From 8bfe8748cce4c2d0712ddd337befe7232962a8f7 Mon Sep 17 00:00:00 2001 From: "easyaspi314 (Devin)" Date: Sun, 5 Apr 2020 18:25:57 -0400 Subject: [PATCH] gzip: hotfix for gnulib vasnprintf.c Don't use %n in vasnprintf.c, it breaks things. $ gzip --version FORTIFY: %n not allowed on Android Aborted See m4's issue in #4381. This should be fixed in the next gzip release, though, as gnulib has been updated in the master branch. However, for now, this will fix things. --- packages/gzip/build.sh | 2 +- packages/gzip/lib-vasnprintf.c.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 packages/gzip/lib-vasnprintf.c.patch diff --git a/packages/gzip/build.sh b/packages/gzip/build.sh index 9a10e683f..0d9e92c33 100644 --- a/packages/gzip/build.sh +++ b/packages/gzip/build.sh @@ -2,7 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://www.gnu.org/software/gzip/ TERMUX_PKG_DESCRIPTION="Standard GNU file compression utilities" TERMUX_PKG_LICENSE="GPL-3.0" TERMUX_PKG_VERSION=1.10 -TERMUX_PKG_REVISION=2 +TERMUX_PKG_REVISION=3 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/gzip/gzip-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=8425ccac99872d544d4310305f915f5ea81e04d0f437ef1a230dc9d1c819d7c0 TERMUX_PKG_ESSENTIAL=true diff --git a/packages/gzip/lib-vasnprintf.c.patch b/packages/gzip/lib-vasnprintf.c.patch new file mode 100644 index 000000000..34ac5a63e --- /dev/null +++ b/packages/gzip/lib-vasnprintf.c.patch @@ -0,0 +1,13 @@ +diff -u -r ../gzip-1.10/lib/vasnprintf.c ./lib/vasnprintf.c +--- ../gzip-1.10/lib/vasnprintf.c 2018-12-21 23:56:16.000000000 -0500 ++++ ./lib/vasnprintf.c 2020-04-05 18:21:34.305189418 -0400 +@@ -4874,7 +4874,8 @@ + # if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \ + && !defined __UCLIBC__) \ + || (defined __APPLE__ && defined __MACH__) \ +- || (defined _WIN32 && ! defined __CYGWIN__)) ++ || (defined _WIN32 && ! defined __CYGWIN__) \ ++ || (defined __ANDROID__)) + fbp[1] = '%'; + fbp[2] = 'n'; + fbp[3] = '\0';