f8c8f851ec61033818694fabbee0fdeb1c46ee6c
[openwrt/openwrt.git] / package / utils / util-linux / patches / 0001-test_enosys-add-support-for-mips.patch
1 From 2558932c65524d953e4c86d7fda2282a582aa5ec Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
3 Date: Wed, 17 May 2023 16:50:47 +0200
4 Subject: [PATCH] test_enosys: add support for mips, powerpc and arc
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
10 ---
11 tests/helpers/test_enosys.c | 14 ++
12 1 file changed, 2 insertions(+)
13
14 --- a/tests/helpers/test_enosys.c
15 +++ b/tests/helpers/test_enosys.c
16 @@ -53,6 +53,20 @@
17 # else
18 # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC64LE
19 # endif
20 +#elif __powerpc__
21 +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC
22 +#elif __mips__
23 +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
24 +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MIPS
25 +# else
26 +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MIPSEL
27 +# endif
28 +#elif __arc__
29 +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
30 +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2BE
31 +# else
32 +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2
33 +# endif
34 #else
35 # error Unknown target architecture
36 #endif