summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/minimum-linux_p.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2019-03-18 07:46:15 -0700
committerThiago Macieira <thiago.macieira@intel.com>2019-03-22 02:07:39 +0000
commit7148dfc67ff20c1c625d203aa47b574b3aaa5db1 (patch)
treec4bb35dae49b105f2514040a9465ba557b51881f /src/corelib/global/minimum-linux_p.h
parent4daf5204babc62a7ae58b6de5c09c527f81ea27c (diff)
Accept that glibc's statx() falls back for us
So we don't need to have a high kernel requirement on its account. I needed to introduce a configure-time check because we need to include a header to get the __GLIBC__ macro, but we can't include any header in assembler until we know it's glibc (we need to know that the header is assembler-safe). glibc, uClibc and MUSL do provide an assembler-safe features.h, but Bionic does not. And we need to know that it's glibc's implementation, since the fallback was not required. The other three libraries may not implement such a thing when they get around to adding the system call. Fixes: QTBUG-74526 Change-Id: I1004b4b819774c4c9296fffd158d14da98bf571c Reviewed-by: Fabian Vogt <fabian@ritter-vogt.de> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/corelib/global/minimum-linux_p.h')
-rw-r--r--src/corelib/global/minimum-linux_p.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/global/minimum-linux_p.h b/src/corelib/global/minimum-linux_p.h
index 9c074e13ba..5112015663 100644
--- a/src/corelib/global/minimum-linux_p.h
+++ b/src/corelib/global/minimum-linux_p.h
@@ -78,7 +78,11 @@ QT_BEGIN_NAMESPACE
* - statx 4.11 QT_CONFIG(statx)
*/
-#if QT_CONFIG(statx)
+#if QT_CONFIG(statx) && !QT_CONFIG(glibc)
+// if using glibc, the statx() function in sysdeps/unix/sysv/linux/statx.c
+// falls back to stat() for us.
+// (Using QT_CONFIG(glibc) instead of __GLIBC__ because the macros aren't
+// defined in assembler mode)
# define MINLINUX_MAJOR 4
# define MINLINUX_MINOR 11
# define MINLINUX_PATCH 0