void-packages/srcpkgs/qt6-webengine/patches/0123-chromium-musl-no-getco...

28 lines
902 B
Diff
Raw Normal View History

2022-08-08 12:13:11 +02:00
--- qt6-webengine-6.4.2.orig/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ qt6-webengine-6.4.2/src/3rdparty/chromium/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -490,7 +490,9 @@ bool ExceptionHandler::SimulateSignalDel
siginfo.si_code = SI_USER;
siginfo.si_pid = getpid();
ucontext_t context;
+#if defined(__GLIBC__)
getcontext(&context);
+#endif
return HandleSignal(sig, &siginfo, &context);
}
@@ -675,9 +677,14 @@ bool ExceptionHandler::WriteMinidump() {
sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
CrashContext context;
+
+#if defined(__GLIBC__)
int getcontext_result = getcontext(&context.context);
if (getcontext_result)
return false;
+#else
+ return false;
+#endif
#if defined(__i386__)
// In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved