From 090a63bade82455707b8a7b4ccc3213287cd3e6d Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Fri, 7 Jul 2017 18:08:26 -0700 Subject: [PATCH] getcontext() API is unimplemented in musl Signed-off-by: Khem Raj --- breakpad/src/client/linux/handler/exception_handler.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/breakpad/src/client/linux/handler/exception_handler.cc b/breakpad/src/client/linux/handler/exception_handler.cc index f2688acaf..dba911b6d 100644 --- a/breakpad/src/client/linux/handler/exception_handler.cc +++ b/breakpad/src/client/linux/handler/exception_handler.cc @@ -477,7 +477,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); } @@ -647,9 +649,13 @@ 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 -- 2.13.2