From 63f74929ead487f108e6e9d0d9a2b48d6b5147df Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Tue, 19 Mar 2019 23:31:24 +0100 Subject: [PATCH] libuv: Avoid using the statx system call Patch away the usage of the statx system call (which is blocked by seccomp) which libuv 1.27.0 started to use. Fixes #3536. --- packages/libuv/build.sh | 1 + packages/libuv/src-unix-fs.c.patch | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 packages/libuv/src-unix-fs.c.patch diff --git a/packages/libuv/build.sh b/packages/libuv/build.sh index fc0fac615..3145dd942 100644 --- a/packages/libuv/build.sh +++ b/packages/libuv/build.sh @@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=https://libuv.org TERMUX_PKG_DESCRIPTION="Support library with a focus on asynchronous I/O" TERMUX_PKG_LICENSE="BSD" TERMUX_PKG_VERSION=1.27.0 +TERMUX_PKG_REVISION=1 TERMUX_PKG_SHA256=8d887047a3670606f6b87e5acdee586caccc6157331096c9c8e102804488cdca TERMUX_PKG_SRCURL=https://dist.libuv.org/dist/v${TERMUX_PKG_VERSION}/libuv-v${TERMUX_PKG_VERSION}.tar.gz diff --git a/packages/libuv/src-unix-fs.c.patch b/packages/libuv/src-unix-fs.c.patch new file mode 100644 index 000000000..597d563e9 --- /dev/null +++ b/packages/libuv/src-unix-fs.c.patch @@ -0,0 +1,13 @@ +diff -u -r ../libuv-v1.27.0/src/unix/fs.c ./src/unix/fs.c +--- ../libuv-v1.27.0/src/unix/fs.c 2019-03-16 18:31:48.000000000 +0000 ++++ ./src/unix/fs.c 2019-03-19 22:29:31.285186496 +0000 +@@ -1059,7 +1059,8 @@ + int is_lstat, + uv_stat_t* buf) { + STATIC_ASSERT(UV_ENOSYS != -1); +-#ifdef __linux__ ++#if defined(__linux__) && !defined(__ANDROID__) ++ /* The statx system call is prevented by seccomp on Android. */ + static int no_statx; + struct uv__statx statxbuf; + int dirfd;