Chromium Code Reviews| Index: sandbox/linux/seccomp-bpf/sandbox_bpf.cc | 
| diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc | 
| index 740320fa326045c29e847a79a9c537970fd2fa8b..b999430ed07d4c3c1c5b700c4fbf522dd7aa590e 100644 | 
| --- a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc | 
| +++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc | 
| @@ -2,6 +2,9 @@ | 
| // Use of this source code is governed by a BSD-style license that can be | 
| // found in the LICENSE file. | 
| +#include <signal.h> | 
| +#include <sys/syscall.h> | 
| + | 
| #ifndef SECCOMP_BPF_STANDALONE | 
| #include "base/logging.h" | 
| #include "base/posix/eintr_wrapper.h" | 
| @@ -13,6 +16,11 @@ | 
| #include "sandbox/linux/seccomp-bpf/syscall_iterator.h" | 
| #include "sandbox/linux/seccomp-bpf/verifier.h" | 
| +// Android's signal.h doesn't define ucontext etc. | 
| +#if defined(OS_ANDROID) && defined(__arm__) | 
| +#include "sandbox/linux/services/android_arm_ucontext.h" | 
| +#endif | 
| + | 
| namespace { | 
| void WriteFailedStderrSetupMessage(int out_fd) { | 
| @@ -39,7 +47,9 @@ void WriteFailedStderrSetupMessage(int out_fd) { | 
| // realtime signals. There are plenty of them. Unfortunately, there is no | 
| // way to mark a signal as allocated. So, the potential for collision is | 
| // possibly even worse. | 
| -bool GetIsInSigHandler(const ucontext_t *ctx) { | 
| +// Note: we can't use "const ucontext_t" because on Android, sigismember does | 
| +// not take a pointer to const. | 
| +bool GetIsInSigHandler(ucontext_t *ctx) { | 
| 
 
Markus (顧孟勤)
2012/12/19 00:44:54
I probably would have left the function signature
 
jln (very slow on Chromium)
2012/12/19 01:45:32
I was worried that sigismember() might touch the s
 
 | 
| return sigismember(&ctx->uc_sigmask, SIGBUS); | 
| } |