OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_ | 5 #ifndef SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_ |
6 #define SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_ | 6 #define SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_ |
7 | 7 |
8 #include <sys/cdefs.h> | 8 #include <sys/types.h> // For __BIONIC__. |
9 // Old Bionic versions do not have sys/user.h. The if can be removed once we no | 9 // Old Bionic versions do not have sys/user.h. The if can be removed once we no |
10 // longer need to support these old Bionic versions. | 10 // longer need to support these old Bionic versions. |
11 // All x86_64 builds use a new enough bionic to have sys/user.h. | 11 // All x86_64 builds use a new enough bionic to have sys/user.h. |
12 #if !defined(__BIONIC__) || defined(__x86_64__) | 12 #if !defined(__BIONIC__) || defined(__x86_64__) |
13 #include <sys/types.h> // Fix for gcc 4.7, make sure __uint16_t is defined. | |
14 #if !defined(__native_client_nonsfi__) | 13 #if !defined(__native_client_nonsfi__) |
15 #include <sys/user.h> | 14 #include <sys/user.h> |
16 #endif | 15 #endif |
17 #if defined(__mips__) | 16 #if defined(__mips__) |
18 // sys/user.h in eglibc misses size_t definition | 17 // sys/user.h in eglibc misses size_t definition |
19 #include <stddef.h> | 18 #include <stddef.h> |
20 #endif | 19 #endif |
21 #endif | 20 #endif |
22 | 21 |
23 #include "sandbox/linux/system_headers/linux_seccomp.h" // For AUDIT_ARCH_* | 22 #include "sandbox/linux/system_headers/linux_seccomp.h" // For AUDIT_ARCH_* |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 #define SECCOMP_PT_PARM3(_regs) (_regs).regs[2] | 285 #define SECCOMP_PT_PARM3(_regs) (_regs).regs[2] |
287 #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3] | 286 #define SECCOMP_PT_PARM4(_regs) (_regs).regs[3] |
288 #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4] | 287 #define SECCOMP_PT_PARM5(_regs) (_regs).regs[4] |
289 #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5] | 288 #define SECCOMP_PT_PARM6(_regs) (_regs).regs[5] |
290 #else | 289 #else |
291 #error Unsupported target platform | 290 #error Unsupported target platform |
292 | 291 |
293 #endif | 292 #endif |
294 | 293 |
295 #endif // SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_ | 294 #endif // SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_ |
OLD | NEW |