From f097cbd9bf975439ed55dbe563d45948a0a43794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Matysiak?= Date: Thu, 9 May 2024 15:01:38 +0200 Subject: [PATCH] Make QFileSystemEngine::canonicalName use the realpath function on VxWorks Despite realpath being available on VxWorks (when the INCLUDE_IO_REALPATH component is used in the VIP), canonicalName doesn't use it, because the system reports _POSIX_VERSION as 200112. Fix the problem by adding an additional condition so that VxWorks correctly uses realpath. Pick-to: 6.7 Task-number: QTBUG-115777 Change-Id: I734f525e870f93a7ec955d379dcc2137b591e171 Reviewed-by: Thiago Macieira --- src/corelib/io/qfilesystemengine_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/io/qfilesystemengine_unix.cpp b/src/corelib/io/qfilesystemengine_unix.cpp index bda2962f8df..2f6c0ae184e 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -642,7 +642,7 @@ QFileSystemEntry QFileSystemEngine::canonicalName(const QFileSystemEntry &entry, { Q_CHECK_FILE_NAME(entry, entry); -#if !defined(Q_OS_DARWIN) && !defined(Q_OS_QNX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU) && _POSIX_VERSION < 200809L +#if !defined(Q_OS_DARWIN) && !defined(Q_OS_QNX) && !defined(Q_OS_ANDROID) && !defined(Q_OS_HAIKU) && _POSIX_VERSION < 200809L && !defined(Q_OS_VXWORKS) // realpath(X,0) is not supported Q_UNUSED(data); return QFileSystemEntry(slowCanonicalized(absoluteName(entry).filePath()));