mirror of
git://git.openembedded.org/meta-openembedded
synced 2026-09-16 19:37:11 +00:00
The libaio subsystem in MariaDB was rewritten in 11.4.8,
which made the previously used patch called
0001-aio_linux-Check-if-syscall-exists-before-using-it.patch
non-applicable.
This patch was deleted in commit f3cd830c09 ("mariadb: 11.4.8")
but it's still needed, because the original code was simply
moved into a new source file.
Add a new patch applying the same change to tpool/aio_libaio.cc
to fix the build error on riscv32.
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
50 lines
1.5 KiB
Diff
50 lines
1.5 KiB
Diff
From a30e52fdb6507dd39b081b1218d95eb8582b81fb Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?=
|
|
<zboszor@gmail.com>
|
|
Date: Mon, 13 Oct 2025 08:57:05 +0200
|
|
Subject: [PATCH] aio_libaio: Check if syscall exists before using it
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Return -ENOSYS if not implememented, fixes build on arches like RISCV32
|
|
Fixes
|
|
tpool/aio_libaio.cc:61:20:
|
|
error: use of undeclared identifier '
|
|
↪ __NR_io_getevents'; did you mean 'io_getevents'?
|
|
| 61 | int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx),
|
|
| | ^~~~~~~~~~~~~~~~~
|
|
|
|
Upstream-Status: Pending
|
|
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
|
Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
|
|
---
|
|
tpool/aio_libaio.cc | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/tpool/aio_libaio.cc b/tpool/aio_libaio.cc
|
|
index 2ce69384cde..60f558afa87 100644
|
|
--- a/tpool/aio_libaio.cc
|
|
+++ b/tpool/aio_libaio.cc
|
|
@@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/
|
|
static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev)
|
|
noexcept
|
|
{
|
|
+#ifdef __NR_io_getevents
|
|
int saved_errno= errno;
|
|
int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx),
|
|
min_nr, nr, ev, 0);
|
|
@@ -67,6 +68,9 @@ static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev)
|
|
errno= saved_errno;
|
|
}
|
|
return ret;
|
|
+#else
|
|
+ return -ENOSYS;
|
|
+#endif
|
|
}
|
|
|
|
|
|
--
|
|
2.51.0
|
|
|