>From 9b622d94ffb1e6e0013a61e9bf368256fdd7e767 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Sun, 8 Jan 2017 19:16:38 -0600 Subject: [PATCH 3/4] 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 --- security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc index 003708d2c..2103251c0 100644 --- a/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc +++ b/security/sandbox/chromium/sandbox/linux/seccomp-bpf/trap.cc @@ -168,7 +168,11 @@ void Trap::SigSys(int nr, LinuxSigInfo* info, ucontext_t* ctx) { // most versions of glibc don't include this information in siginfo_t. So, // we need to explicitly copy it into a arch_sigsys structure. struct arch_sigsys sigsys; +#if defined(__GLIBC__) memcpy(&sigsys, &info->_sifields, sizeof(sigsys)); +#else + memcpy(&sigsys, &info->__si_fields, sizeof(sigsys)); +#endif #if defined(__mips__) // When indirect syscall (syscall(__NR_foo, ...)) is made on Mips, the -- 2.11.0