aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-06-10 07:58:54 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2021-06-10 07:58:54 +0100
commit6012cc3584cfa18c6e37c2a1a56af08b04a9a5f6 (patch)
tree7d0352c46766ae10e8a29042c8b4ce9a981cc207 /seccomp-bpf.h
parentlddtree: respect (destination) root with --argv0 interp probing (diff)
downloadpax-utils-6012cc3584cfa18c6e37c2a1a56af08b04a9a5f6.tar.gz
pax-utils-6012cc3584cfa18c6e37c2a1a56af08b04a9a5f6.tar.bz2
pax-utils-6012cc3584cfa18c6e37c2a1a56af08b04a9a5f6.zip
seccomp: fix build failure on mips (use _MIP_SIM tests)
glibc's sysdeps/mips/sgidefs.h unconditionally mips _ABI* enum values: #define _ABIO32 1 #define _ABIN32 2 #define _ABI64 3 #define _ABIO64 4 This causes build failures on multiple definitions: In file included from security.c:9: seccomp-bpf.h:73:28: error: redefinition of 'seccomp_bpf_blks_base' 73 | static const unsigned char seccomp_bpf_blks_base[] = { | ^~~~~~~~~~~~~~~~~~~~~ The fix is to test current ABI against _MIPS_SIM. Fixed-by: Manuel Lauss Bug: https://bugs.gentoo.org/795075 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'seccomp-bpf.h')
-rw-r--r--seccomp-bpf.h16
1 files changed, 9 insertions, 7 deletions
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[] = {