Blob Blame History Raw
diff --git a/src/corelib/configure.json b/src/corelib/configure.json
index dfb575da..e87c3fd4 100644
--- a/src/corelib/configure.json
+++ b/src/corelib/configure.json
@@ -508,7 +508,7 @@
         },
         "getentropy": {
             "label": "getentropy()",
-            "condition": "config.unix && tests.getentropy",
+            "disable": "true",
             "output": [ "privateFeature" ]
         },
         "glib": {
@@ -636,7 +636,7 @@
         },
         "renameat2": {
             "label": "renameat2()",
-            "condition": "config.linux && tests.renameat2",
+            "disable": "true",
             "output": [ "privateFeature" ]
         },
         "slog2": {
@@ -646,7 +646,7 @@
         },
         "statx": {
             "label": "statx() in libc",
-            "condition": "config.linux && tests.statx",
+            "disable": "true",
             "output": [ "privateFeature" ]
         },
         "syslog": {
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index be6ce48d..5b337c0f 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -50,9 +50,10 @@
 #include <pwd.h>
 #include <stdlib.h> // for realpath()
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <unistd.h>
+#define renameat2 renameat2_unused
 #include <stdio.h>
+#undef renameat2
 #include <errno.h>

 #if QT_HAS_INCLUDE(<paths.h>)
@@ -91,7 +92,9 @@ extern "C" NSString *NSTemporaryDirectory();
 #  include <sys/syscall.h>
 #  include <sys/sendfile.h>
 #  include <linux/fs.h>
-#  include <linux/stat.h>
+#define statx statx_unused
+#  include <sys/stat.h>
+#undef statx

 // in case linux/fs.h is too old and doesn't define it:
 #ifndef FICLONE
@@ -107,12 +110,12 @@ extern "C" NSString *NSTemporaryDirectory();
 #    undef STATX_BASIC_STATS
 #  else
 #    if !QT_CONFIG(renameat2) && defined(SYS_renameat2)
-static int renameat2(int oldfd, const char *oldpath, int newfd, const char *newpath, unsigned flags)
+extern 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)
-static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struct statx *statxbuf)
+extern 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