diff --git a/packages/coreutils/build.sh b/packages/coreutils/build.sh index 50eb379d79..6c3f4b6bbf 100644 --- a/packages/coreutils/build.sh +++ b/packages/coreutils/build.sh @@ -3,7 +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.1 -TERMUX_PKG_REVISION=1 +TERMUX_PKG_REVISION=2 TERMUX_PKG_SRCURL=https://mirrors.kernel.org/gnu/coreutils/coreutils-${TERMUX_PKG_VERSION}.tar.xz TERMUX_PKG_SHA256=61a1f410d78ba7e7f37a5a4f50e6d1320aca33375484a3255eddf17a38580423 TERMUX_PKG_DEPENDS="libandroid-support, libgmp, libiconv" diff --git a/packages/coreutils/lib-fflush.c.patch b/packages/coreutils/lib-fflush.c.patch deleted file mode 100644 index 78b6f6eb44..0000000000 --- a/packages/coreutils/lib-fflush.c.patch +++ /dev/null @@ -1,37 +0,0 @@ -See https://github.com/termux/termux-packages/issues/11912. - ---- a/lib/fflush.c -+++ b/lib/fflush.c -@@ -231,3 +231,32 @@ - } - #endif - } -+ -+#if defined __ANDROID__ && !defined __LP64__ -+ -+#include -+ -+typedef ssize_t (*write_impl_t)(int, const void *, size_t); -+ -+ssize_t -+write(int __fd, const void *__buf, size_t __count) -+{ -+ static int initialized = 0; -+ static write_impl_t libc_impl = NULL; -+ -+ if (!initialized) { -+ libc_impl = dlsym(RTLD_NEXT, "write"); -+ initialized = 1; -+ } -+ -+ /* This should not normally happen. */ -+ if ((uint64_t)__buf + (uint64_t)__count == (1ULL << 32)) -+ return (ssize_t)__count; -+ -+ if (libc_impl != NULL) -+ return libc_impl(__fd, __buf, __count); -+ -+ __builtin_abort(); -+} -+ -+#endif diff --git a/packages/coreutils/lib-stdio-impl.h.patch b/packages/coreutils/lib-stdio-impl.h.patch new file mode 100644 index 0000000000..0fd3ee7c4a --- /dev/null +++ b/packages/coreutils/lib-stdio-impl.h.patch @@ -0,0 +1,22 @@ +--- a/lib/stdio-impl.h ++++ b/lib/stdio-impl.h +@@ -68,8 +68,10 @@ + # elif defined __ANDROID__ /* Android */ + # ifdef __LP64__ + # define _gl_flags_file_t int ++# define _gl_struct_file_off_t int64_t + # else + # define _gl_flags_file_t short ++# define _gl_struct_file_off_t __kernel_off_t + # endif + /* Up to this commit from 2015-10-12 + +@@ -96,7 +98,7 @@ + unsigned char _nbuf[1]; \ + struct { unsigned char *_base; size_t _size; } _lb; \ + int _blksize; \ +- fpos_t _offset; \ ++ _gl_struct_file_off_t _offset; \ + /* More fields, not relevant here. */ \ + } *) fp) + # else