termux-packages/packages/valgrind/no-statx.patch

42 lines
1.5 KiB
Diff

diff -uNr valgrind-3.16.1/coregrind/m_aspacemgr/aspacemgr-common.c valgrind-3.16.1.mod/coregrind/m_aspacemgr/aspacemgr-common.c
--- ./coregrind/m_aspacemgr/aspacemgr-common.c.orig 2021-10-10 16:17:32.000000000 +0200
+++ ./coregrind/m_aspacemgr/aspacemgr-common.c 2022-01-02 11:31:30.967514202 +0100
@@ -330,6 +330,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 = "";
@@ -341,6 +342,7 @@
*mode = (UInt)bufx.stx_mode;
return True;
}
+#endif
# endif // VGO_linux only
# if defined(VGO_linux) && defined(__NR_fstat64)
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 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;
@@ -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;