Add sw64 architecture

Signed-off-by: wzx <wuzx1226@qq.com>
This commit is contained in:
wzx 2022-11-10 14:56:31 +08:00
parent 096283b6f8
commit 872d16350a
2 changed files with 43 additions and 1 deletions

View File

@ -0,0 +1,38 @@
From d09c9df44e060a648640738bbb12f74f84437643 Mon Sep 17 00:00:00 2001
From: wzx <wuzx1226@qq.com>
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 <wuzx1226@qq.com>
---
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

View File

@ -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<wuzx1226@qq.com> - 0.7-3
- add sw64 patch
* Tue Aug 10 2021 Miaohe Lin <linmiaohe@huawei.com> - 0.7-2
- cope with variable SIGSTKSZ