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

Side by Side Diff: sandbox/linux/seccomp-bpf/linux_seccomp.h

Issue 371573003: gcc 4.7 workaround for __uint16_t (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_SECCOMP_BPF_LINUX_SECCOMP_H__ 5 #ifndef SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__
6 #define SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__ 6 #define SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__
7 7
8 // The Seccomp2 kernel ABI is not part of older versions of glibc. 8 // The Seccomp2 kernel ABI is not part of older versions of glibc.
9 // As we can't break compilation with these versions of the library, 9 // As we can't break compilation with these versions of the library,
10 // we explicitly define all missing symbols. 10 // we explicitly define all missing symbols.
11 // If we ever decide that we can now rely on system headers, the following 11 // If we ever decide that we can now rely on system headers, the following
12 // include files should be enabled: 12 // include files should be enabled:
13 // #include <linux/audit.h> 13 // #include <linux/audit.h>
14 // #include <linux/seccomp.h> 14 // #include <linux/seccomp.h>
15 15
16 #include <asm/unistd.h> 16 #include <asm/unistd.h>
17 #include <linux/filter.h> 17 #include <linux/filter.h>
18 18
19 #include <sys/cdefs.h> 19 #include <sys/cdefs.h>
20 // Old Bionic versions do not have sys/user.h. The if can be removed once we no 20 // Old Bionic versions do not have sys/user.h. The if can be removed once we no
21 // longer need to support these old Bionic versions. 21 // longer need to support these old Bionic versions.
22 // All x86_64 builds use a new enough bionic to have sys/user.h. 22 // All x86_64 builds use a new enough bionic to have sys/user.h.
23 #if !defined(__BIONIC__) || defined(__x86_64__) 23 #if !defined(__BIONIC__) || defined(__x86_64__)
24 #include <sys/types.h> // Fix for gcc 4.7, make sure __uint16_t is defined.
24 #include <sys/user.h> 25 #include <sys/user.h>
25 #endif 26 #endif
26 27
27 // For audit.h 28 // For audit.h
28 #ifndef EM_ARM 29 #ifndef EM_ARM
29 #define EM_ARM 40 30 #define EM_ARM 40
30 #endif 31 #endif
31 #ifndef EM_386 32 #ifndef EM_386
32 #define EM_386 3 33 #define EM_386 3
33 #endif 34 #endif
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 #define SECCOMP_PT_PARM4(_regs) (_regs).REG_r3 286 #define SECCOMP_PT_PARM4(_regs) (_regs).REG_r3
286 #define SECCOMP_PT_PARM5(_regs) (_regs).REG_r4 287 #define SECCOMP_PT_PARM5(_regs) (_regs).REG_r4
287 #define SECCOMP_PT_PARM6(_regs) (_regs).REG_r5 288 #define SECCOMP_PT_PARM6(_regs) (_regs).REG_r5
288 289
289 #else 290 #else
290 #error Unsupported target platform 291 #error Unsupported target platform
291 292
292 #endif 293 #endif
293 294
294 #endif // SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__ 295 #endif // SANDBOX_LINUX_SECCOMP_BPF_LINUX_SECCOMP_H__
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698