From 0fc1e355f07235ca7fe1f04d7206394772c6b5f4 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sat, 25 Aug 2018 11:44:46 +0200 Subject: [PATCH 34/34] Fix build error related to glibc 2.28 and stat Taken from regular package, comes from Fedora --- mkspecs/linux-g++/qplatformdefs.h | 2 ++ src/corelib/io/qfilesystemengine_unix.cpp | 10 +++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h index 13523f0702..d32453162c 100644 --- a/mkspecs/linux-g++/qplatformdefs.h +++ b/mkspecs/linux-g++/qplatformdefs.h @@ -72,7 +72,9 @@ #include #include #include +#if 0 #include +#endif #include #include diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index be6ce48d0c..3648cfc43d 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -50,7 +50,9 @@ #include #include // for realpath() #include +#if 0 #include +#endif #include #include #include @@ -91,7 +93,9 @@ extern "C" NSString *NSTemporaryDirectory(); # include # include # include +#if 0 # include +#endif // in case linux/fs.h is too old and doesn't define it: #ifndef FICLONE @@ -105,13 +109,13 @@ extern "C" NSString *NSTemporaryDirectory(); # undef SYS_renameat2 # undef SYS_statx # undef STATX_BASIC_STATS -# else -# if !QT_CONFIG(renameat2) && defined(SYS_renameat2) +# else +# if 0 && !QT_CONFIG(renameat2) && defined(SYS_renameat2) static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newpath, unsigned flags) { return syscall(SYS_renameat2, oldfd, oldpath, newfd, newpath, flags); } # endif -# if !QT_CONFIG(statx) && defined(SYS_statx) +# if 0 && !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) -- 2.18.0