aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--seccomp-bpf.c16
-rw-r--r--seccomp-bpf.h16
2 files changed, 18 insertions, 14 deletions
diff --git a/seccomp-bpf.c b/seccomp-bpf.c
index f69e5ce..8e61f7f 100644
--- a/seccomp-bpf.c
+++ b/seccomp-bpf.c
@@ -28,12 +28,12 @@ static const struct {
#define A(arch, ifdef) { #arch, SCMP_ARCH_##arch, ifdef }
A(AARCH64, "defined(__aarch64__)"),
A(ARM, "defined(__arm__)"),
- A(MIPS, "defined(__mips__) && defined(__MIPSEB__) && defined(_ABIO32)"),
- A(MIPS64, "defined(__mips__) && defined(__MIPSEB__) && defined(_ABI64)"),
- A(MIPS64N32, "defined(__mips__) && defined(__MIPSEB__) && defined(_ABIN32)"),
- A(MIPSEL, "defined(__mips__) && defined(__MIPSEL__) && defined(_ABIO32)"),
- A(MIPSEL64, "defined(__mips__) && defined(__MIPSEL__) && defined(_ABI64)"),
- A(MIPSEL64N32, "defined(__mips__) && defined(__MIPSEL__) && defined(_ABIN32)"),
+ A(MIPS, "defined(__mips__) && defined(__MIPSEB__) && (_MIPS_SIM == _ABIO32)"),
+ A(MIPS64, "defined(__mips__) && defined(__MIPSEB__) && (_MIPS_SIM == _ABI64)"),
+ A(MIPS64N32, "defined(__mips__) && defined(__MIPSEB__) && (_MIPS_SIM == _ABIN32)"),
+ A(MIPSEL, "defined(__mips__) && defined(__MIPSEL__) && (_MIPS_SIM == _ABIO32)"),
+ A(MIPSEL64, "defined(__mips__) && defined(__MIPSEL__) && (_MIPS_SIM == _ABI64)"),
+ A(MIPSEL64N32, "defined(__mips__) && defined(__MIPSEL__) && (_MIPS_SIM == _ABIN32)"),
A(PARISC, "defined(__hppa__) && !defined(__hppa64__)"),
A(PARISC64, "defined(__hppa__) && defined(__hppa64__)"),
A(PPC, "defined(__powerpc__) && !defined(__powerpc64__) && defined(__BIG_ENDIAN__)"),
@@ -210,7 +210,9 @@ int main(void)
if (!ctx)
err(1, "seccomp_init failed");
- printf("/* AUTO GENERATED; see seccomp-bpf.c for details. */\n");
+ printf("/* AUTO GENERATED FILE. To regenerate run:\n");
+ printf("/* $ make seccomp-bpf.h\n");
+ printf("/* See seccomp-bpf.c for details. */\n");
printf("#undef SECCOMP_BPF_AVAILABLE\n");
if (seccomp_arch_remove(ctx, seccomp_arch_native()) < 0)
diff --git a/seccomp-bpf.h b/seccomp-bpf.h
index 5966bd5..95f5bfb 100644
--- a/seccomp-bpf.h
+++ b/seccomp-bpf.h
@@ -1,4 +1,6 @@
-/* AUTO GENERATED; see seccomp-bpf.c for details. */
+/* AUTO GENERATED FILE. To regenerate run:
+/* $ make seccomp-bpf.h
+/* See seccomp-bpf.c for details. */
#undef SECCOMP_BPF_AVAILABLE
#if defined(__aarch64__)
@@ -23,7 +25,7 @@ static const unsigned char seccomp_bpf_blks_fork[] = {
};
#endif
-#if defined(__mips__) && defined(__MIPSEB__) && defined(_ABIO32)
+#if defined(__mips__) && defined(__MIPSEB__) && (_MIPS_SIM == _ABIO32)
/* MIPS */
#define SECCOMP_BPF_AVAILABLE
static const unsigned char seccomp_bpf_blks_base[] = {
@@ -34,7 +36,7 @@ static const unsigned char seccomp_bpf_blks_fork[] = {
};
#endif
-#if defined(__mips__) && defined(__MIPSEB__) && defined(_ABI64)
+#if defined(__mips__) && defined(__MIPSEB__) && (_MIPS_SIM == _ABI64)
/* MIPS64 */
#define SECCOMP_BPF_AVAILABLE
static const unsigned char seccomp_bpf_blks_base[] = {
@@ -45,7 +47,7 @@ static const unsigned char seccomp_bpf_blks_fork[] = {
};
#endif
-#if defined(__mips__) && defined(__MIPSEB__) && defined(_ABIN32)
+#if defined(__mips__) && defined(__MIPSEB__) && (_MIPS_SIM == _ABIN32)
/* MIPS64N32 */
#define SECCOMP_BPF_AVAILABLE
static const unsigned char seccomp_bpf_blks_base[] = {
@@ -56,7 +58,7 @@ static const unsigned char seccomp_bpf_blks_fork[] = {
};
#endif
-#if defined(__mips__) && defined(__MIPSEL__) && defined(_ABIO32)
+#if defined(__mips__) && defined(__MIPSEL__) && (_MIPS_SIM == _ABIO32)
/* MIPSEL */
#define SECCOMP_BPF_AVAILABLE
static const unsigned char seccomp_bpf_blks_base[] = {
@@ -67,7 +69,7 @@ static const unsigned char seccomp_bpf_blks_fork[] = {
};
#endif
-#if defined(__mips__) && defined(__MIPSEL__) && defined(_ABI64)
+#if defined(__mips__) && defined(__MIPSEL__) && (_MIPS_SIM == _ABI64)
/* MIPSEL64 */
#define SECCOMP_BPF_AVAILABLE
static const unsigned char seccomp_bpf_blks_base[] = {
@@ -78,7 +80,7 @@ static const unsigned char seccomp_bpf_blks_fork[] = {
};
#endif
-#if defined(__mips__) && defined(__MIPSEL__) && defined(_ABIN32)
+#if defined(__mips__) && defined(__MIPSEL__) && (_MIPS_SIM == _ABIN32)
/* MIPSEL64N32 */
#define SECCOMP_BPF_AVAILABLE
static const unsigned char seccomp_bpf_blks_base[] = {