From 27407322e8dffc2f368aed529da9e4d919c6ed11 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. Task-number: QTBUG-115777 Change-Id: I734f525e870f93a7ec955d379dcc2137b591e171 Reviewed-by: Thiago Macieira (cherry picked from commit f097cbd9bf975439ed55dbe563d45948a0a43794) Reviewed-by: Qt Cherry-pick Bot --- 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 cacce00257f..ef332fa3f5b 100644 --- a/src/corelib/io/qfilesystemengine_unix.cpp +++ b/src/corelib/io/qfilesystemengine_unix.cpp @@ -647,7 +647,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()));