]> git.armaanb.net Git - asd-repo.git/blob - extra/chromium/patches/musl-no-getcontext.patch
Switch browser to Chromium
[asd-repo.git] / extra / chromium / patches / musl-no-getcontext.patch
1 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
2 index ca353c4..a6cb5f9 100644
3 --- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
4 +++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc
5 @@ -490,7 +490,9 @@ bool ExceptionHandler::SimulateSignalDelivery(int sig) {
6    siginfo.si_code = SI_USER;
7    siginfo.si_pid = getpid();
8    ucontext_t context;
9 +#if defined(__GLIBC__)
10    getcontext(&context);
11 +#endif
12    return HandleSignal(sig, &siginfo, &context);
13  }
14  
15 @@ -675,9 +677,14 @@ bool ExceptionHandler::WriteMinidump() {
16    sys_prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
17  
18    CrashContext context;
19 +
20 +#if defined(__GLIBC__)
21    int getcontext_result = getcontext(&context.context);
22    if (getcontext_result)
23      return false;
24 +#else
25 +  return false;
26 +#endif
27  
28  #if defined(__i386__)
29    // In CPUFillFromUContext in minidumpwriter.cc the stack pointer is retrieved