From: Rafael Sadowski Subject: x11/qt6/qtbase: QFileSystemEngine::canonicalName realpath(3) To: ports@openbsd.org Date: Thu, 10 Sep 2026 19:06:49 +0200 // On some Android and macOS versions, realpath() will return a path even if // it does not exist. To work around this, we check existence in advance. This also applies to OpenBSD. Found during a search for getexecpath cases. OK? diff --git a/x11/qt6/qtbase/patches/patch-src_corelib_io_qfilesystemengine_unix_cpp b/x11/qt6/qtbase/patches/patch-src_corelib_io_qfilesystemengine_unix_cpp new file mode 100644 index 00000000000..f0ac7622314 --- /dev/null +++ b/x11/qt6/qtbase/patches/patch-src_corelib_io_qfilesystemengine_unix_cpp @@ -0,0 +1,13 @@ +Check the return value of realpath(3) to see if it actually exists. +Index: src/corelib/io/qfilesystemengine_unix.cpp +--- src/corelib/io/qfilesystemengine_unix.cpp.orig ++++ src/corelib/io/qfilesystemengine_unix.cpp +@@ -716,7 +716,7 @@ QFileSystemEntry QFileSystemEngine::canonicalName(cons + auto freer = qScopeGuard([&] { free(resolved_name); }); + #endif + +-# if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) ++# if defined(Q_OS_DARWIN) || defined(Q_OS_ANDROID) || defined(Q_OS_OPENBSD) + // On some Android and macOS versions, realpath() will return a path even if + // it does not exist. To work around this, we check existence in advance. + if (!data.hasFlags(QFileSystemMetaData::ExistsAttribute))