diff options
Diffstat (limited to 'meta-oe/recipes-dbs/mysql/mariadb/0001-aio_libaio-Check-if-syscall-exists-before-using-it.patch')
-rw-r--r-- | meta-oe/recipes-dbs/mysql/mariadb/0001-aio_libaio-Check-if-syscall-exists-before-using-it.patch | 49 |
1 files changed, 49 insertions, 0 deletions
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 @@ | |||
1 | From a30e52fdb6507dd39b081b1218d95eb8582b81fb Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Zolt=C3=A1n=20B=C3=B6sz=C3=B6rm=C3=A9nyi?= | ||
3 | <zboszor@gmail.com> | ||
4 | Date: Mon, 13 Oct 2025 08:57:05 +0200 | ||
5 | Subject: [PATCH] aio_libaio: Check if syscall exists before using it | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | Return -ENOSYS if not implememented, fixes build on arches like RISCV32 | ||
11 | Fixes | ||
12 | tpool/aio_libaio.cc:61:20: | ||
13 | error: use of undeclared identifier ' | ||
14 | ↪ __NR_io_getevents'; did you mean 'io_getevents'? | ||
15 | | 61 | int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx), | ||
16 | | | ^~~~~~~~~~~~~~~~~ | ||
17 | |||
18 | Upstream-Status: Pending | ||
19 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
20 | Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com> | ||
21 | --- | ||
22 | tpool/aio_libaio.cc | 4 ++++ | ||
23 | 1 file changed, 4 insertions(+) | ||
24 | |||
25 | diff --git a/tpool/aio_libaio.cc b/tpool/aio_libaio.cc | ||
26 | index 2ce69384cde..60f558afa87 100644 | ||
27 | --- a/tpool/aio_libaio.cc | ||
28 | +++ b/tpool/aio_libaio.cc | ||
29 | @@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111 - 1301 USA*/ | ||
30 | static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev) | ||
31 | noexcept | ||
32 | { | ||
33 | +#ifdef __NR_io_getevents | ||
34 | int saved_errno= errno; | ||
35 | int ret= syscall(__NR_io_getevents, reinterpret_cast<long>(ctx), | ||
36 | min_nr, nr, ev, 0); | ||
37 | @@ -67,6 +68,9 @@ static int my_getevents(io_context_t ctx, long min_nr, long nr, io_event *ev) | ||
38 | errno= saved_errno; | ||
39 | } | ||
40 | return ret; | ||
41 | +#else | ||
42 | + return -ENOSYS; | ||
43 | +#endif | ||
44 | } | ||
45 | |||
46 | |||
47 | -- | ||
48 | 2.51.0 | ||
49 | |||