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 #include // for realpath() #include -#include #include +#define renameat2 renameat2_unused #include +#undef renameat2 #include #if QT_HAS_INCLUDE() @@ -91,7 +92,9 @@ extern "C" NSString *NSTemporaryDirectory(); # include # include # include -# include +#define statx statx_unused +# include +#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