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>
Sat, 2 Sep 2023 07:55:57 +0000 (09:55 +0200)
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..f0f7786
--- /dev/null
@@ -0,0 +1,16 @@
+diff -ruN util-linux-2.39.old/tests/helpers/test_enosys.c util-linux-2.39/tests/helpers/test_enosys.c
+--- util-linux-2.39.old/tests/helpers/test_enosys.c    2023-08-08 20:11:23.677039863 +0200
++++ util-linux-2.39/tests/helpers/test_enosys.c        2023-08-09 12:11:11.053306309 +0200
+@@ -67,6 +67,12 @@
+ #    else
+ #      define SECCOMP_ARCH_NATIVE AUDIT_ARCH_ARCV2
+ #    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