summaryrefslogtreecommitdiffstats
path: root/tests/benchmarks/corelib/io/qdiriterator/main.cpp
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@qt.io>2017-09-15 02:05:43 -0700
committerJake Petroules <jake.petroules@qt.io>2017-09-15 20:52:23 +0000
commit2740b9d66819cb44a596644eb5fbb956ffe39b86 (patch)
tree2fe65bb17ca2ed0794b1ec19711d14fc8e74549d /tests/benchmarks/corelib/io/qdiriterator/main.cpp
parent71272023583f4046c9a003691ddf3d630e8d20c2 (diff)
Use QT_LSTAT instead of lstat directly
Not all platforms (such as VxWorks) have lstat. Change-Id: If42f0041f9a6d9bec0a355173c88f28f1819bd57 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'tests/benchmarks/corelib/io/qdiriterator/main.cpp')
-rw-r--r--tests/benchmarks/corelib/io/qdiriterator/main.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/benchmarks/corelib/io/qdiriterator/main.cpp b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
index cd5a83e547..e71daccf7d 100644
--- a/tests/benchmarks/corelib/io/qdiriterator/main.cpp
+++ b/tests/benchmarks/corelib/io/qdiriterator/main.cpp
@@ -28,6 +28,7 @@
#include <QDebug>
#include <QDirIterator>
#include <QString>
+#include <qplatformdefs.h>
#ifdef Q_OS_WIN
# include <qt_windows.h>
@@ -142,8 +143,8 @@ static int posix_helper(const char *dirpath)
QByteArray ba = dirpath;
ba += '/';
ba += entry->d_name;
- struct stat st;
- lstat(ba.constData(), &st);
+ QT_STATBUF st;
+ QT_LSTAT(ba.constData(), &st);
if (S_ISDIR(st.st_mode))
count += posix_helper(ba.constData());
}