From 1153a97b409ea605c7260b6fb894394770229547 Mon Sep 17 00:00:00 2001 From: Zoltán Böszörményi Date: Mon, 13 Oct 2025 09:09:03 +0200 Subject: mariadb: Bring back reworked aio patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Khem Raj --- meta-oe/recipes-dbs/mysql/mariadb.inc | 1 + ...o-Check-if-syscall-exists-before-using-it.patch | 49 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 meta-oe/recipes-dbs/mysql/mariadb/0001-aio_libaio-Check-if-syscall-exists-before-using-it.patch (limited to 'meta-oe/recipes-dbs') diff --git a/meta-oe/recipes-dbs/mysql/mariadb.inc b/meta-oe/recipes-dbs/mysql/mariadb.inc index 53a24d14bc..6e07f1ffa9 100644 --- a/meta-oe/recipes-dbs/mysql/mariadb.inc +++ b/meta-oe/recipes-dbs/mysql/mariadb.inc @@ -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 \ diff --git a/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_libaio-Check-if-syscall-exists-before-using-it.patch b/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_libaio-Check-if-syscall-exists-before-using-it.patch new file mode 100644 index 0000000000..ee0d1b37ae --- /dev/null +++ b/meta-oe/recipes-dbs/mysql/mariadb/0001-aio_libaio-Check-if-syscall-exists-before-using-it.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?= + +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(ctx), + | | ^~~~~~~~~~~~~~~~~ + +Upstream-Status: Pending +Signed-off-by: Khem Raj +Signed-off-by: Zoltán Böszörményi +--- + 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(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 + -- cgit v1.2.3-54-g00ecf