]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
enosys: add support for MIPS, PowerPC and ARC
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 17 May 2023 15:00:31 +0000 (17:00 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Fri, 19 May 2023 15:47:52 +0000 (17:47 +0200)
Co-developed-by: Hauke Mertens <hauke@hauke-m.de>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
misc-utils/enosys.c

index b51fe36872f976fd74b04f78169878e1361ff45f..1d5fdadf558b2bf9558afdc5b3d7182777506c4f 100644 (file)
 #    else
 #       define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC64LE
 #    endif
+#elif __powerpc__
+#    define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC
+#elif __mips__
+#    if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#       define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MIPS
+#    else
+#       define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MIPSEL
+#    endif
+#elif __arc__
+#    if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#       define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2BE
+#    else
+#       define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2
+#    endif
 #else
 #    error Unknown target architecture
 #endif