98f737b
diff --git a/mkspecs/linux-g++/qplatformdefs.h b/mkspecs/linux-g++/qplatformdefs.h
98f737b
index 13523f07..d3245316 100644
98f737b
--- a/mkspecs/linux-g++/qplatformdefs.h
98f737b
+++ b/mkspecs/linux-g++/qplatformdefs.h
4ac28c2
@@ -72,7 +72,9 @@
4ac28c2
 #include <sys/time.h>
4ac28c2
 #include <sys/shm.h>
4ac28c2
 #include <sys/socket.h>
4ac28c2
+#if 0
4ac28c2
 #include <sys/stat.h>
4ac28c2
+#endif
4ac28c2
 #include <sys/wait.h>
4ac28c2
 #include <netinet/in.h>
98f737b
98f737b
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
98f737b
index deb4a9f2..d03cf86c 100644
98f737b
--- a/src/corelib/io/qfilesystemengine_unix.cpp
98f737b
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
4ac28c2
@@ -50,7 +50,9 @@
4ac28c2
 #include <pwd.h>
4ac28c2
 #include <stdlib.h> // for realpath()
4ac28c2
 #include <sys/types.h>
4ac28c2
+#if 0
4ac28c2
 #include <sys/stat.h>
4ac28c2
+#endif
4ac28c2
 #include <unistd.h>
4ac28c2
 #include <stdio.h>
4ac28c2
 #include <errno.h>
98f737b
@@ -105,12 +107,12 @@ extern "C" NSString *NSTemporaryDirectory();
4ac28c2
 #    undef SYS_statx
4ac28c2
 #    undef STATX_BASIC_STATS
98f737b
 #  else
4ac28c2
-#    if !QT_CONFIG(renameat2) && defined(SYS_renameat2)
4ac28c2
+#    if 0 && !QT_CONFIG(renameat2) && defined(SYS_renameat2)
4ac28c2
 static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newpath, unsigned flags)
4ac28c2
 { return syscall(SYS_renameat2, oldfd, oldpath, newfd, newpath, flags); }
4ac28c2
 #    endif
98f737b
4ac28c2
-#    if !QT_CONFIG(statx) && defined(SYS_statx)
4ac28c2
+#    if 0 && !QT_CONFIG(statx) && defined(SYS_statx)
98f737b
 #      include <linux/stat.h>
4ac28c2
 static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
4ac28c2
 { return syscall(SYS_statx, dirfd, pathname, flag, mask, statxbuf); }