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>
This commit is contained in:
parent
4daf5204ba
commit
7148dfc67f
@ -374,6 +374,16 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"glibc": {
|
||||
"label": "GNU libc",
|
||||
"type": "compile",
|
||||
"test": {
|
||||
"include": "stdlib.h",
|
||||
"main": [
|
||||
"return __GLIBC__;"
|
||||
]
|
||||
}
|
||||
},
|
||||
"inotify": {
|
||||
"label": "inotify",
|
||||
"type": "compile",
|
||||
@ -593,6 +603,12 @@
|
||||
"condition": "libs.glib",
|
||||
"output": [ "privateFeature", "feature" ]
|
||||
},
|
||||
"glibc": {
|
||||
"label": "GNU libc",
|
||||
"autoDetect": "config.linux",
|
||||
"condition": "tests.glibc",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"iconv": {
|
||||
"label": "iconv",
|
||||
"purpose": "Provides internationalization on Unix.",
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user