void-packages/srcpkgs/electron9/files/musl-patches/chromium-musl_getcontext.patch

26 lines
923 B
Diff

diff --git a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
index b895f6d..4f13352 100644
--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
@@ -490,7 +490,9 @@ bool ExceptionHandler::SimulateSignalDelivery(int sig) {
siginfo.si_code = SI_USER;
siginfo.si_pid = getpid();
ucontext_t context;
+#if defined(__GLIBC__)
getcontext(&context);
+#endif
return HandleSignal(sig, &siginfo, &context);
}
@@ -675,8 +677,10 @@ 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)
+#endif
return false;
#if defined(__i386__)