Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(258)

Unified Diff: sandbox/linux/bpf_dsl/seccomp_macros.h

Issue 1029283003: WIP: Implement seccomp-bpf sandbox for nacl_helper_nonsfi. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/bpf_dsl/policy_compiler.cc ('k') | sandbox/linux/bpf_dsl/verifier.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/linux/bpf_dsl/seccomp_macros.h
diff --git a/sandbox/linux/bpf_dsl/seccomp_macros.h b/sandbox/linux/bpf_dsl/seccomp_macros.h
index 7fd0e67f1a55fea062a3762565f254074ae24ce6..d4d5b82498ca3fce26d8a2639a1793e31bf29f4d 100644
--- a/sandbox/linux/bpf_dsl/seccomp_macros.h
+++ b/sandbox/linux/bpf_dsl/seccomp_macros.h
@@ -5,16 +5,16 @@
#ifndef SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_
#define SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_
-#include <asm/unistd.h>
-#include <linux/filter.h>
+#include "build/build_config.h"
-#include <sys/cdefs.h>
// Old Bionic versions do not have sys/user.h. The if can be removed once we no
// longer need to support these old Bionic versions.
// All x86_64 builds use a new enough bionic to have sys/user.h.
#if !defined(__BIONIC__) || defined(__x86_64__)
#include <sys/types.h> // Fix for gcc 4.7, make sure __uint16_t is defined.
+#if !defined(OS_NACL_NONSFI)
#include <sys/user.h>
+#endif
#if defined(__mips__)
// sys/user.h in eglibc misses size_t definition
#include <stddef.h>
@@ -53,10 +53,10 @@
8*(nr) + 0)
-#if defined(__BIONIC__)
-// Old Bionic versions don't have sys/user.h, so we just define regs_struct
-// directly. This can be removed once we no longer need to support these old
-// Bionic versions.
+#if defined(__BIONIC__) || defined(OS_NACL_NONSFI)
+// Old Bionic versions and PNaCl toolchain for nacl_helper_nonsfi don't have
+// sys/user.h, so we just define regs_struct directly. This can be removed
+// once we no longer need to support these old Bionic versions.
struct regs_struct {
long int ebx;
long int ecx;
« no previous file with comments | « sandbox/linux/bpf_dsl/policy_compiler.cc ('k') | sandbox/linux/bpf_dsl/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698