valgrind: avoid statx() system call

Issue https://github.com/termux/termux-packages/issues/5860.
This commit is contained in:
Leonid Pliushch 2020-10-01 13:19:27 +03:00
parent 80f719f719
commit ed39f4a327
2 changed files with 20 additions and 0 deletions

View File

@ -2,6 +2,7 @@ TERMUX_PKG_HOMEPAGE=http://valgrind.org/
TERMUX_PKG_DESCRIPTION="Instrumentation framework for building dynamic analysis tools"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=3.16.1
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=ftp://sourceware.org/pub/valgrind/valgrind-${TERMUX_PKG_VERSION}.tar.bz2
TERMUX_PKG_SHA256=c91f3a2f7b02db0f3bc99479861656154d241d2fdb265614ba918cc6720a33ca
TERMUX_PKG_BREAKS="valgrind-dev"

View File

@ -0,0 +1,19 @@
diff -uNr valgrind-3.16.1/coregrind/m_libcfile.c valgrind-3.16.1.mod/coregrind/m_libcfile.c
--- valgrind-3.16.1/coregrind/m_libcfile.c 2019-12-27 16:51:44.000000000 +0200
+++ valgrind-3.16.1.mod/coregrind/m_libcfile.c 2020-10-01 13:18:22.849906467 +0300
@@ -368,6 +368,7 @@
/* On Linux, first try with statx. If that doesn't work out, fall back to
the stat64 or vanilla version. */
{ struct vki_statx buf;
+#ifndef __ANDROID__
res = VG_(do_syscall5)(__NR_statx, VKI_AT_FDCWD, (UWord)file_name, 0,
VKI_STATX_ALL, (UWord)&buf);
if (!(sr_isError(res) && sr_Err(res) == VKI_ENOSYS)) {
@@ -376,6 +377,7 @@
TRANSLATE_statx_TO_vg_stat(vgbuf, &buf);
return res;
}
+#endif
}
# endif
# if defined(VGO_linux) || defined(VGO_darwin)