From 6eef81ee1c82f934e14d47047d8b6103b8755321 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 23 Mar 2018 08:58:01 +0800 Subject: QFileSystemEngine: don't try to use statx(2) if SYS_statx isn't defined If glibc's does not define SYS_statx but did define struct statx and related constants, we failed to compile. Task-number: QTBUG-68205 Change-Id: I04a43ee94975482f9e32fffd151e66bbe6988554 Reviewed-by: Lars Knoll --- src/corelib/io/qfilesystemengine_unix.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index b8cf42a2e9..be6ce48d0c 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -114,6 +114,8 @@ static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newp # if !QT_CONFIG(statx) && defined(SYS_statx) static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf) { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); } +# elif !QT_CONFIG(statx) && !defined(SYS_statx) +# undef STATX_BASIC_STATS # endif # endif // !Q_OS_ANDROID #endif -- cgit v1.2.3