From fd66f2970c15da3006c882f33a0d06329c2187c4 Mon Sep 17 00:00:00 2001 From: Henrik Grimler Date: Mon, 1 Apr 2019 15:28:20 +0200 Subject: [PATCH] nodejs: avoid using __NR_statx See https://github.com/termux/termux-packages/issues/3608 --- packages/nodejs/build.sh | 3 ++- .../deps-uv-src-unix-linux-syscalls.c.patch | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 packages/nodejs/deps-uv-src-unix-linux-syscalls.c.patch diff --git a/packages/nodejs/build.sh b/packages/nodejs/build.sh index bf6fdf119..4b697e100 100644 --- a/packages/nodejs/build.sh +++ b/packages/nodejs/build.sh @@ -2,8 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://nodejs.org/ TERMUX_PKG_DESCRIPTION="Platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications" TERMUX_PKG_LICENSE="MIT" TERMUX_PKG_VERSION=11.13.0 -TERMUX_PKG_SHA256=7411952da11f6033d4ca5993d68f52b0d7eb90538099102c37d5221c445dc38a +TERMUX_PKG_REVISION=1 TERMUX_PKG_SRCURL=https://nodejs.org/dist/v${TERMUX_PKG_VERSION}/node-v${TERMUX_PKG_VERSION}.tar.xz +TERMUX_PKG_SHA256=7411952da11f6033d4ca5993d68f52b0d7eb90538099102c37d5221c445dc38a # Note that we do not use a shared libuv to avoid an issue with the Android # linker, which does not use symbols of linked shared libraries when resolving # symbols on dlopen(). See https://github.com/termux/termux-packages/issues/462. diff --git a/packages/nodejs/deps-uv-src-unix-linux-syscalls.c.patch b/packages/nodejs/deps-uv-src-unix-linux-syscalls.c.patch new file mode 100644 index 000000000..636fe2c84 --- /dev/null +++ b/packages/nodejs/deps-uv-src-unix-linux-syscalls.c.patch @@ -0,0 +1,20 @@ +--- ../linux-syscalls.c.orig 2019-04-01 12:59:57.770124746 +0000 ++++ ./deps/uv/src/unix/linux-syscalls.c 2019-04-01 13:00:38.703457159 +0000 +@@ -187,7 +187,7 @@ + # endif + #endif /* __NR_pwritev */ + +-#ifndef __NR_statx ++#if !defined(__NR_statx) && !defined(__ANDROID__) + # if defined(__x86_64__) + # define __NR_statx 332 + # elif defined(__i386__) +@@ -358,7 +358,7 @@ + int flags, + unsigned int mask, + struct uv__statx* statxbuf) { +-#if defined(__NR_statx) ++#if defined(__NR_statx) && !defined(__ANDROID__) + return syscall(__NR_statx, dirfd, path, flags, mask, statxbuf); + #else + return errno = ENOSYS, -1;