void-packages/srcpkgs/chromium/patches/no-getcontext.patch
Đoàn Trần Công Danh c987560802 srcpkgs/c*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

27 lines
889 B
Diff

--- a/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 09:59:55.554536646 +0100
+++ b/third_party/breakpad/breakpad/src/client/linux/handler/exception_handler.cc 2015-12-06 10:01:16.818238035 +0100
@@ -477,7 +477,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);
}
@@ -647,9 +649,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