valgrind: update statx patch
Fixes https://github.com/termux/termux-packages/issues/5860
This commit is contained in:
parent
6c6fb4cfc7
commit
74b1fc3445
@ -2,7 +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_REVISION=2
|
||||
TERMUX_PKG_SRCURL=ftp://sourceware.org/pub/valgrind/valgrind-${TERMUX_PKG_VERSION}.tar.bz2
|
||||
TERMUX_PKG_SHA256=c91f3a2f7b02db0f3bc99479861656154d241d2fdb265614ba918cc6720a33ca
|
||||
TERMUX_PKG_BREAKS="valgrind-dev"
|
||||
|
@ -1,19 +1,40 @@
|
||||
diff -uNr valgrind-3.16.1/coregrind/m_aspacemgr/aspacemgr-common.c valgrind-3.16.1.mod/coregrind/m_aspacemgr/aspacemgr-common.c
|
||||
--- valgrind-3.16.1/coregrind/m_aspacemgr/aspacemgr-common.c 2019-12-27 16:51:44.000000000 +0200
|
||||
+++ valgrind-3.16.1.mod/coregrind/m_aspacemgr/aspacemgr-common.c 2020-10-01 18:18:17.072570786 +0300
|
||||
@@ -319,6 +319,7 @@
|
||||
# if defined(VGO_linux) || defined(VGO_darwin)
|
||||
SysRes res;
|
||||
# if defined(VGO_linux)
|
||||
+#ifndef __ANDROID__
|
||||
/* First try with statx. */
|
||||
struct vki_statx bufx;
|
||||
const char* file_name = "";
|
||||
@@ -330,6 +331,7 @@
|
||||
*mode = (UInt)bufx.stx_mode;
|
||||
return True;
|
||||
}
|
||||
+#endif
|
||||
# endif
|
||||
# if defined(VGO_linux) && defined(__NR_fstat64)
|
||||
/* fstat64 is second candidate as it can cope with minor and major device
|
||||
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 @@
|
||||
+++ valgrind-3.16.1.mod/coregrind/m_libcfile.c 2020-10-01 18:20:40.369886417 +0300
|
||||
@@ -364,7 +364,7 @@
|
||||
SysRes res;
|
||||
VG_(memset)(vgbuf, 0, sizeof(*vgbuf));
|
||||
|
||||
-# if defined(VGO_linux)
|
||||
+# if defined(VGO_linux) && !defined(__ANDROID__)
|
||||
/* 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)
|
||||
@@ -434,7 +434,7 @@
|
||||
SysRes res;
|
||||
VG_(memset)(vgbuf, 0, sizeof(*vgbuf));
|
||||
|
||||
-# if defined(VGO_linux)
|
||||
+# if defined(VGO_linux) && !defined(__ANDROID__)
|
||||
/* On Linux, first try with statx. If that doesn't work out, fall back to
|
||||
the fstat64 or vanilla version. */
|
||||
{ struct vki_statx buf;
|
||||
|
Loading…
Reference in New Issue
Block a user