Skip to content

Commit

Permalink
nodejs: avoid using __NR_statx
Browse files Browse the repository at this point in the history
  • Loading branch information
Grimler91 committed Apr 1, 2019
1 parent 06d9209 commit 10bd480
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/nodejs/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
20 changes: 20 additions & 0 deletions packages/nodejs/deps-uv-src-unix-linux-syscalls.c.patch
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit 10bd480

Please sign in to comment.