From 872d16350a76ce251b9f6f81dff48b62cf1cf377 Mon Sep 17 00:00:00 2001 From: wzx Date: Thu, 10 Nov 2022 14:56:31 +0800 Subject: [PATCH] Add sw64 architecture Signed-off-by: wzx --- liburing-Add-sw64-architecture.patch | 38 ++++++++++++++++++++++++++++ liburing.spec | 6 ++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 liburing-Add-sw64-architecture.patch diff --git a/liburing-Add-sw64-architecture.patch b/liburing-Add-sw64-architecture.patch new file mode 100644 index 0000000..1eca2a1 --- /dev/null +++ b/liburing-Add-sw64-architecture.patch @@ -0,0 +1,38 @@ +From d09c9df44e060a648640738bbb12f74f84437643 Mon Sep 17 00:00:00 2001 +From: wzx +Date: Thu, 10 Nov 2022 14:47:45 +0800 +Subject: [PATCH] Add sw64 architecture + +Add sw64 architecture in src/syscall.c to support sw64 architecture. + +Signed-off-by: wzx +--- + src/syscall.c | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +diff --git a/src/syscall.c b/src/syscall.c +index c41e099..ea7a69f 100644 +--- a/src/syscall.c ++++ b/src/syscall.c +@@ -24,7 +24,17 @@ + # ifndef __NR_io_uring_register + # define __NR_io_uring_register 537 + # endif +-#else /* !__alpha__ */ ++#elif defined __sw_64__ ++# ifndef __NR_io_uring_setup ++# define __NR_io_uring_setup 272 ++# endif ++# ifndef __NR_io_uring_enter ++# define __NR_io_uring_enter 273 ++# endif ++# ifndef __NR_io_uring_register ++# define __NR_io_uring_register 274 ++# endif ++#else /* !__alpha__ && !__sw_64__*/ + # ifndef __NR_io_uring_setup + # define __NR_io_uring_setup 425 + # endif +-- +2.33.0 + diff --git a/liburing.spec b/liburing.spec index 523a511..8ae843d 100644 --- a/liburing.spec +++ b/liburing.spec @@ -1,6 +1,6 @@ Name: liburing Version: 0.7 -Release: 2 +Release: 3 Summary: Linux-native io_uring I/O access library License: (GPLv2 with exceptions and LGPLv2+) or MIT Source0: https://brick.kernel.dk/snaps/%{name}-%{version}.tar.gz @@ -8,6 +8,7 @@ URL: https://git.kernel.dk/cgit/liburing/ BuildRequires: gcc Patch1: 0001-examples-ucontext-cp.c-cope-with-variable-SIGSTKSZ.patch +Patch2: liburing-Add-sw64-architecture.patch %description Provides native async IO for the Linux kernel, in a fast and efficient @@ -47,6 +48,9 @@ for the Linux-native io_uring. %{_mandir}/man2/* %changelog +* Fri Oct 21 2022 wuzx - 0.7-3 +- add sw64 patch + * Tue Aug 10 2021 Miaohe Lin - 0.7-2 - cope with variable SIGSTKSZ