aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Dearman <chris.dearman@imgtec.com>2015-12-16 08:51:58 -0800
committerandroid-build-merger <android-build-merger@google.com>2015-12-16 08:51:58 -0800
commit9766720c18edbd681c4a179434361f41a92909e8 (patch)
tree4c856af2ec0db43ad58e6ff5ed37fd5d73aa2435
parentda05f95494bde31ee5f36ab56df1869d691a70b2 (diff)
parentce31a91f92f677e2712d1a7f03da607db17a6b82 (diff)
downloadtlsdate-9766720c18edbd681c4a179434361f41a92909e8.tar.gz
Add MIPS little endian architectures and fix preprocessor indentation
am: ce31a91f92 * commit 'ce31a91f92f677e2712d1a7f03da607db17a6b82': Add MIPS little endian architectures and fix preprocessor indentation
-rw-r--r--src/seccomp.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/seccomp.c b/src/seccomp.c
index 92c6e80..2e84dfc 100644
--- a/src/seccomp.c
+++ b/src/seccomp.c
@@ -27,8 +27,8 @@
/* Use a signal handler to emit violations when debugging */
#ifdef SECCOMP_FILTER_DEBUG
-# undef SECCOMP_FILTER_FAIL
-# define SECCOMP_FILTER_FAIL SECCOMP_RET_TRAP
+# undef SECCOMP_FILTER_FAIL
+# define SECCOMP_FILTER_FAIL SECCOMP_RET_TRAP
#endif /* SANDBOX_SECCOMP_FILTER_DEBUG */
/* Simple helpers to avoid manual errors (but larger BPF programs). */
@@ -44,18 +44,24 @@
#elif defined(__x86_64__)
# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_X86_64
#elif defined(__arm__)
-# ifndef EM_ARM
-# define EM_ARM 40
-# endif
+# ifndef EM_ARM
+# define EM_ARM 40
+# endif
# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_ARM
#elif defined(__aarch64__)
# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_AARCH64
#elif defined(__mips__)
-# if defined(__LP64__)
-# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPS64
-# else
-# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPS
-# endif
+# if defined(__MIPSEL__)
+# if defined(__LP64__)
+# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPS64EL
+# else
+# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPSEL
+# endif
+# elif defined(__LP64__)
+# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPS64
+# else
+# define SECCOMP_AUDIT_ARCH AUDIT_ARCH_MIPS
+# endif
#else
# error "Platform does not support seccomp filter yet"
#endif