diff options
Diffstat (limited to 'dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-close.patch')
-rw-r--r-- | dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-close.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-close.patch b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-close.patch new file mode 100644 index 00000000..208ab64f --- /dev/null +++ b/dev-qt/qtwebengine/files/qtwebengine-6.5.1-musl-close.patch @@ -0,0 +1,33 @@ +https://git.alpinelinux.org/aports/tree/testing/qt6-qtwebengine/0009-close.patch + +--- a/src/3rdparty/chromium/base/files/scoped_file_linux.cc ++++ b/src/3rdparty/chromium/base/files/scoped_file_linux.cc +@@ -7,6 +7,7 @@ + #include <algorithm> + #include <array> + #include <atomic> ++#include <dlfcn.h> + + #include "base/compiler_specific.h" + #include "base/debug/stack_trace.h" +@@ -80,9 +81,18 @@ + + extern "C" { + +-int __close(int); +- + __attribute__((visibility("default"), noinline)) int close(int fd) { ++ static int (*__close)(int) = nullptr; ++ ++ if (__close == nullptr) { ++ __close = (int (*)(int))dlsym(RTLD_NEXT, "close"); ++ ++ if (__close == nullptr) { ++ RAW_LOG(ERROR, "musl close not found\n"); ++ IMMEDIATE_CRASH(); ++ } ++ } ++ + if (base::IsFDOwned(fd) && g_is_ownership_enforced) + CrashOnFdOwnershipViolation(); + return __close(fd); |