diff options
author | Samuel Tan <samueltan@google.com> | 2015-10-09 14:13:05 -0700 |
---|---|---|
committer | Samuel Tan <samueltan@google.com> | 2015-10-09 14:26:03 -0700 |
commit | 68db15cc2ea5b8314b4c8f7f3920423aeb5e25eb (patch) | |
tree | fffd8c9307f97c8f844518bb55f9373a64f67515 /bpf.h | |
parent | c0e60a2790cc6eefe1226b81a6b049d081b6101d (diff) | |
download | minijail-68db15cc2ea5b8314b4c8f7f3920423aeb5e25eb.tar.gz |
minijail: fix Makefile and bpf.h to build in CrOS
Make the following two changes to ensure that minijail builds
in CrOS:
1) Edit references to the previously renamed signal.o file to
signal_handler.o in the Makefile
2) Add a comparison of __LITTLE_ENDIAN with __BYTE_ORDER to
bpf.h, since __LITTLE_ENDIAN__ is not defined when building
for CrOS.
BUG: 24680644
Change-Id: I152573d29a87a3a685c0d27e728632e84462e8ef
TEST: Cherry-pick change to CrOS and minijail build succeeds.
Diffstat (limited to 'bpf.h')
-rw-r--r-- | bpf.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -10,6 +10,7 @@ #define BPF_H #include <asm/bitsperlong.h> /* for __BITS_PER_LONG */ +#include <endian.h> #include <linux/audit.h> #include <linux/filter.h> #include <stddef.h> @@ -84,7 +85,7 @@ struct seccomp_data { #define bpf_comp_jset bpf_comp_jset64 /* Ensure that we load the logically correct offset. */ -#if defined(__LITTLE_ENDIAN__) +#if defined(__LITTLE_ENDIAN__) || __BYTE_ORDER == __LITTLE_ENDIAN #define LO_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) #define HI_ARG(idx) offsetof(struct seccomp_data, args[(idx)]) + sizeof(__u32) #else |