24 lines
914 B
Diff
24 lines
914 B
Diff
Source: @Johnnynator
|
|
Upsteam: No
|
|
Subject: Musl always returns /lib/libQt6Core.so.6 for Dl_info.dli_fname.
|
|
This also happens sometimes with qtwebengine on glibc.
|
|
This breaks qt6-webengine's search path for translations.
|
|
Using realpath instead would probably be a more correct solution.
|
|
|
|
---
|
|
--- qt6-base-6.4.2.orig/src/corelib/global/qlibraryinfo.cpp
|
|
+++ qt6-base-6.4.2/src/corelib/global/qlibraryinfo.cpp
|
|
@@ -358,6 +358,12 @@ static QString getRelocatablePrefix(QLib
|
|
int result = dladdr(reinterpret_cast<void *>(&QLibraryInfo::isDebugBuild), &info);
|
|
if (result > 0 && info.dli_fname)
|
|
prefixPath = prefixFromQtCoreLibraryHelper(QString::fromLocal8Bit(info.dli_fname));
|
|
+#if 1
|
|
+ QDir preDir(prefixPath);
|
|
+ if (preDir.isRoot()) {
|
|
+ prefixPath = QStringLiteral("/usr");
|
|
+ }
|
|
+#endif
|
|
#elif defined(Q_OS_WIN)
|
|
Q_UNUSED(usageMode);
|
|
HMODULE hModule = getWindowsModuleHandle();
|