diff options
author | rickyz <rickyz@chromium.org> | 2015-07-22 19:09:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-23 02:09:41 +0000 |
commit | 2194bbb976d14c1c1a1b7dc44db793e0141ae6be (patch) | |
tree | 4440ac54de3a98e5404b83dd86a8e8a52d1e2df1 /sandbox | |
parent | 7a9014c20e46380c32cfdea29c192e7628e182c2 (diff) | |
download | chromium_src-2194bbb976d14c1c1a1b7dc44db793e0141ae6be.zip chromium_src-2194bbb976d14c1c1a1b7dc44db793e0141ae6be.tar.gz chromium_src-2194bbb976d14c1c1a1b7dc44db793e0141ae6be.tar.bz2 |
Use sys/types.h instead of sys/cdefs to pull in __BIONIC__.
sys/cdefs.h is not a standard header, so this broke compilation on
systems with musl libc.
Thanks to Felix Janda for the patch!
BUG=463208
Review URL: https://codereview.chromium.org/1248533005
Cr-Commit-Position: refs/heads/master@{#340033}
Diffstat (limited to 'sandbox')
-rw-r--r-- | sandbox/linux/bpf_dsl/seccomp_macros.h | 3 | ||||
-rw-r--r-- | sandbox/linux/seccomp-bpf/sandbox_bpf.cc | 6 |
2 files changed, 1 insertions, 8 deletions
diff --git a/sandbox/linux/bpf_dsl/seccomp_macros.h b/sandbox/linux/bpf_dsl/seccomp_macros.h index ca28c1d..af70f21 100644 --- a/sandbox/linux/bpf_dsl/seccomp_macros.h +++ b/sandbox/linux/bpf_dsl/seccomp_macros.h @@ -5,12 +5,11 @@ #ifndef SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_ #define SANDBOX_LINUX_BPF_DSL_SECCOMP_MACROS_H_ -#include <sys/cdefs.h> +#include <sys/types.h> // For __BIONIC__. // 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(__native_client_nonsfi__) #include <sys/user.h> #endif diff --git a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc index 239043e..77faba4 100644 --- a/sandbox/linux/seccomp-bpf/sandbox_bpf.cc +++ b/sandbox/linux/seccomp-bpf/sandbox_bpf.cc @@ -4,12 +4,6 @@ #include "sandbox/linux/seccomp-bpf/sandbox_bpf.h" -// Some headers on Android are missing cdefs: crbug.com/172337. -// (We can't use OS_ANDROID here since build_config.h is not included). -#if defined(ANDROID) -#include <sys/cdefs.h> -#endif - #include <errno.h> #include <sys/prctl.h> #include <sys/types.h> |