0001-test_enosys-add-support-for-mips.patch 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
  9. ---
  10. tests/helpers/test_enosys.c | 14 ++
  11. 1 file changed, 2 insertions(+)
  12. --- a/tests/helpers/test_enosys.c
  13. +++ b/tests/helpers/test_enosys.c
  14. @@ -53,6 +53,20 @@
  15. # else
  16. # define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC64LE
  17. # endif
  18. +#elif __powerpc__
  19. +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_PPC
  20. +#elif __mips__
  21. +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  22. +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MIPS
  23. +# else
  24. +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_MIPSEL
  25. +# endif
  26. +#elif __arc__
  27. +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
  28. +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2BE
  29. +# else
  30. +# define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2
  31. +# endif
  32. #else
  33. # error Unknown target architecture
  34. #endif