summaryrefslogtreecommitdiff
path: root/sys-libs/liburing/files/liburing-2.1-arm-syscall.patch
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2021-10-20 10:22:14 +0100
committerV3n3RiX <venerix@koprulu.sector>2021-10-20 10:22:14 +0100
commit46eedbedafdb0040c37884982d4c775ce277fb7b (patch)
treedb33a91259730be84999e13a8d8168c799f50ac0 /sys-libs/liburing/files/liburing-2.1-arm-syscall.patch
parente23a08d0c97a0cc415aaa165da840b056f93c997 (diff)
gentoo resync : 20.10.2021
Diffstat (limited to 'sys-libs/liburing/files/liburing-2.1-arm-syscall.patch')
-rw-r--r--sys-libs/liburing/files/liburing-2.1-arm-syscall.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/sys-libs/liburing/files/liburing-2.1-arm-syscall.patch b/sys-libs/liburing/files/liburing-2.1-arm-syscall.patch
new file mode 100644
index 000000000000..a652b052148a
--- /dev/null
+++ b/sys-libs/liburing/files/liburing-2.1-arm-syscall.patch
@@ -0,0 +1,54 @@
+https://github.com/axboe/liburing/commit/cb350a8989adbd65db574325d9a86d5437d800da
+https://bugs.gentoo.org/816798
+
+From cb350a8989adbd65db574325d9a86d5437d800da Mon Sep 17 00:00:00 2001
+From: Guillem Jover <guillem@hadrons.org>
+Date: Mon, 13 Sep 2021 23:56:08 +0200
+Subject: [PATCH] test: Use syscall wrappers instead of using syscall(2)
+ directly
+
+Some of these syscalls have different entry points depending on the
+architecture. Use the wrappers to avoid having to reimplement them
+portably.
+
+Fixes build failures on Debian armel and armhf builds.
+
+Signed-off-by: Guillem Jover <guillem@hadrons.org>
+--- a/test/sqpoll-cancel-hang.c
++++ b/test/sqpoll-cancel-hang.c
+@@ -4,7 +4,6 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <sys/mman.h>
+-#include <sys/syscall.h>
+ #include <sys/wait.h>
+ #include <time.h>
+ #include <unistd.h>
+@@ -29,8 +28,6 @@ static uint64_t current_time_ms(void)
+
+ #define IORING_OFF_SQES 0x10000000ULL
+
+-#define sys_io_uring_setup 425
+-
+ static void kill_and_wait(int pid, int* status)
+ {
+ kill(-pid, SIGKILL);
+@@ -53,7 +50,7 @@ a5)
+ void* vma2 = (void*)a3;
+ void** ring_ptr_out = (void**)a4;
+ void** sqes_ptr_out = (void**)a5;
+- uint32_t fd_io_uring = syscall(sys_io_uring_setup, entries, setup_params);
++ uint32_t fd_io_uring = __sys_io_uring_setup(entries, setup_params);
+ uint32_t sq_ring_sz = setup_params->sq_off.array +
+ setup_params->sq_entries * sizeof(uint32_t);
+ uint32_t cq_ring_sz = setup_params->cq_off.cqes +
+@@ -135,7 +132,7 @@ void trigger_bug(void)
+ }
+ int main(void)
+ {
+- syscall(__NR_mmap, 0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
++ mmap((void *)0x20000000ul, 0x1000000ul, 7ul, 0x32ul, -1, 0ul);
+ int pid = fork();
+ if (pid < 0)
+ exit(1);
+