Index: components/nacl/loader/nacl_sandbox_linux.cc |
diff --git a/components/nacl/loader/nacl_sandbox_linux.cc b/components/nacl/loader/nacl_sandbox_linux.cc |
index 14ba18ff53ebc76ef88f31ac424ab0908bbb9544..f1e4a49a4f71b1ab1efaaade862ea8a9d9f399b2 100644 |
--- a/components/nacl/loader/nacl_sandbox_linux.cc |
+++ b/components/nacl/loader/nacl_sandbox_linux.cc |
@@ -13,6 +13,8 @@ |
#include "base/compiler_specific.h" |
#include "base/logging.h" |
#include "build/build_config.h" |
+ |
+#if defined(USE_SECCOMP_BPF) |
#include "content/public/common/sandbox_init.h" |
#include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" |
#include "sandbox/linux/seccomp-bpf/sandbox_bpf_policy.h" |
@@ -151,12 +153,22 @@ void RunSandboxSanityChecks() { |
} // namespace |
+#else |
+ |
+#if !defined(ARCH_CPU_MIPS_FAMILY) |
+#error "Seccomp-bpf disabled on supported architecture!" |
+#endif |
+ |
+#endif // defined(USE_SECCOMP_BPF) |
+ |
bool InitializeBPFSandbox() { |
+#if defined(USE_SECCOMP_BPF) |
bool sandbox_is_initialized = content::InitializeSandbox( |
scoped_ptr<SandboxBPFPolicy>(new NaClBPFSandboxPolicy())); |
if (sandbox_is_initialized) { |
RunSandboxSanityChecks(); |
return true; |
} |
+#endif // defined(USE_SECCOMP_BPF) |
return false; |
} |