]> 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>
Thu, 1 Jun 2023 10:16:34 +0000 (12:16 +0200)
Co-developed-by: Hauke Mertens <hauke@hauke-m.de>
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
tests/helpers/test_enosys.c

index 9ee31610f9ee1b9cec1a40fdf4beedb8ee74161e..fd147f9edad78bcc13579e3be67e1e5bfb34c200 100644 (file)
 #    endif
 #else
 #    error Unknown target architecture
+#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
 #endif
 
 #define syscall_nr (offsetof(struct seccomp_data, nr))