mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-04-20 11:38:34 +00:00
mariadb: Bring back reworked aio patch
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>
This commit is contained in:
committed by
Khem Raj
parent
4fdeb6375e
commit
1153a97b40
@@ -15,6 +15,7 @@ SRC_URI = "https://archive.mariadb.org/${BP}/source/${BP}.tar.gz \
|
||||
file://fix-arm-atomic.patch \
|
||||
file://0001-Fix-library-LZ4-lookup.patch \
|
||||
file://0001-innobase-Define-__NR_futex-if-it-does-not-exist.patch \
|
||||
file://0001-aio_libaio-Check-if-syscall-exists-before-using-it.patch \
|
||||
file://ssize_t.patch \
|
||||
file://sys_futex.patch \
|
||||
file://cross-compiling.patch \
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user