summaryrefslogtreecommitdiff
path: root/firefox/0009-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
diff options
context:
space:
mode:
Diffstat (limited to 'firefox/0009-musl-Add-alternate-name-for-private-siginfo-struct-m.patch')
-rw-r--r--firefox/0009-musl-Add-alternate-name-for-private-siginfo-struct-m.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/firefox/0009-musl-Add-alternate-name-for-private-siginfo-struct-m.patch b/firefox/0009-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
new file mode 100644
index 000000000..300846f46
--- /dev/null
+++ b/firefox/0009-musl-Add-alternate-name-for-private-siginfo-struct-m.patch
@@ -0,0 +1,35 @@
+From d8ec0bd6f3b0ad2dfd8a97a864f08decaafdea69 Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Sun, 8 Jan 2017 19:16:38 -0600
+Subject: [PATCH 10/30] musl: Add alternate name for private siginfo struct
+ member
+
+musl does not provide a macro for detecting its presence. For now,
+assume that it is the only non-glibc-based libc on Linux systems.
+
+Signed-off-by: Samuel Holland <samuel@sholland.org>
+Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
+---
+ security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
+index 9884be8bb2..86d8f88e30 100644
+--- a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
++++ b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc
+@@ -174,7 +174,11 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) {
+ // If the version of glibc doesn't include this information in
+ // siginfo_t (older than 2.17), we need to explicitly copy it
+ // into an arch_sigsys structure.
+- memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
++#if defined(__GLIBC__)
++ memcpy(&sigsys, &info->_sifields, sizeof(sigsys));
++#else
++ memcpy(&sigsys, &info->__si_fields, sizeof(sigsys));
++#endif
+ #endif
+
+ #if defined(__mips__)
+--
+2.34.1
+

Generated by cgit