util-linux: test_enosys: add support for SH
authorZoltan HERPAI <wigyori@uid0.hu>
Wed, 9 Aug 2023 11:06:17 +0000 (13:06 +0200)
committerZoltan HERPAI <wigyori@uid0.hu>
Fri, 15 Mar 2024 16:03:32 +0000 (17:03 +0100)
Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
package/utils/util-linux/patches/0002-test_enosys-add-support-for-sh4.patch [new file with mode: 0644]

diff --git a/package/utils/util-linux/patches/0002-test_enosys-add-support-for-sh4.patch b/package/utils/util-linux/patches/0002-test_enosys-add-support-for-sh4.patch
new file mode 100644 (file)
index 0000000..29cf33d
--- /dev/null
@@ -0,0 +1,15 @@
+--- a/include/audit-arch.h
++++ b/include/audit-arch.h
+@@ -57,6 +57,12 @@
+ #    else
+ #      define SECCOMP_ARCH_NATIVE AUDIT_ARCH_LOONGARCH64
+ #    endif
++#elif __sh__
++#    if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
++#       define SECCOMP_ARCH_NATIVE AUDIT_ARCH_SH
++#    else
++#       define SECCOMP_ARCH_NATIVE AUDIT_ARCH_SHEL
++#    endif
+ #else
+ #    error Unknown target architecture
+ #endif