summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qfilesystemengine_unix.cpp5
-rw-r--r--src/corelib/io/qfilesystemmetadata_p.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp
index b1f2fca32b..77d154c6b4 100644
--- a/src/corelib/io/qfilesystemengine_unix.cpp
+++ b/src/corelib/io/qfilesystemengine_unix.cpp
@@ -102,6 +102,10 @@ static int statx(int dirfd, const char *pathname, int flag, unsigned mask, struc
# endif
#endif
+#ifndef STATX_BASIC_STATS
+struct statx { mode_t stx_mode; };
+#endif
+
QT_BEGIN_NAMESPACE
#define emptyFileEntryWarning() emptyFileEntryWarning_(QT_MESSAGELOG_FILE, QT_MESSAGELOG_LINE, QT_MESSAGELOG_FUNC)
@@ -390,7 +394,6 @@ inline void QFileSystemMetaData::fillFromStatxBuf(const struct statx &statxBuffe
groupId_ = statxBuffer.stx_gid;
}
#else
-struct statx { mode_t stx_mode; };
static int qt_statx(const char *, struct statx *)
{ return -ENOSYS; }
diff --git a/src/corelib/io/qfilesystemmetadata_p.h b/src/corelib/io/qfilesystemmetadata_p.h
index 55e44d52c7..4d2a5acb9b 100644
--- a/src/corelib/io/qfilesystemmetadata_p.h
+++ b/src/corelib/io/qfilesystemmetadata_p.h
@@ -64,6 +64,10 @@
# endif
#endif
+#ifdef Q_OS_UNIX
+struct statx;
+#endif
+
QT_BEGIN_NAMESPACE
class QFileSystemEngine;