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.
diff --git a/bpf.h b/bpf.h
index fdf8279..9e28ede 100644
--- a/bpf.h
+++ b/bpf.h
@@ -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 @@
#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