From 48ca75555522716f0f686dcae3dd6cf3d8ad714d Mon Sep 17 00:00:00 2001 From: davidovski Date: Tue, 31 May 2022 11:05:19 +0100 Subject: removed idea of repos --- repo/chromium/scoped-file.patch | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 repo/chromium/scoped-file.patch (limited to 'repo/chromium/scoped-file.patch') diff --git a/repo/chromium/scoped-file.patch b/repo/chromium/scoped-file.patch new file mode 100644 index 0000000..34bf6eb --- /dev/null +++ b/repo/chromium/scoped-file.patch @@ -0,0 +1,31 @@ +--- ./base/files/scoped_file_linux.cc.orig ++++ ./base/files/scoped_file_linux.cc +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + #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); -- cgit v1.2.1