diff options
-rw-r--r-- | meta-oe/recipes-crypto/libkcapi/libkcapi/0001-Disable-use-of-__NR_io_getevents-when-not-defined.patch | 36 | ||||
-rw-r--r-- | meta-oe/recipes-crypto/libkcapi/libkcapi_1.2.1.bb | 4 |
2 files changed, 39 insertions, 1 deletions
diff --git a/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-Disable-use-of-__NR_io_getevents-when-not-defined.patch b/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-Disable-use-of-__NR_io_getevents-when-not-defined.patch new file mode 100644 index 0000000000..9d9f63e34d --- /dev/null +++ b/meta-oe/recipes-crypto/libkcapi/libkcapi/0001-Disable-use-of-__NR_io_getevents-when-not-defined.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 771dd6aa45dd0bbbb7d7c7a7b116e1b5666fbd7a Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 15 Nov 2020 18:05:48 -0800 | ||
4 | Subject: [PATCH] Disable use of __NR_io_getevents when not defined | ||
5 | |||
6 | Architectures like riscv32 do not define this syscall, therefore return | ||
7 | ENOSYS on such architectures | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/smuellerDD/libkcapi/pull/100] | ||
10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
11 | --- | ||
12 | lib/internal.h | 12 ++++++++++++ | ||
13 | 1 file changed, 12 insertions(+) | ||
14 | |||
15 | --- a/lib/internal.h | ||
16 | +++ b/lib/internal.h | ||
17 | @@ -325,10 +325,17 @@ static inline int io_submit(aio_context_ | ||
18 | return syscall(__NR_io_submit, ctx, n, iocb); | ||
19 | } | ||
20 | |||
21 | -static inline int io_getevents(aio_context_t ctx, long min, long max, | ||
22 | - struct io_event *events, struct timespec *timeout) | ||
23 | +static inline int io_getevents(__attribute__((unused)) aio_context_t ctx, | ||
24 | + __attribute__((unused)) long min, | ||
25 | + __attribute__((unused)) long max, | ||
26 | + __attribute__((unused)) struct io_event *events, | ||
27 | + __attribute__((unused)) struct timespec *timeout) | ||
28 | { | ||
29 | +#ifdef __NR_io_getevents | ||
30 | return syscall(__NR_io_getevents, ctx, min, max, events, timeout); | ||
31 | +#else | ||
32 | + return -ENOSYS; | ||
33 | +#endif | ||
34 | } | ||
35 | |||
36 | /************************************************************ | ||
diff --git a/meta-oe/recipes-crypto/libkcapi/libkcapi_1.2.1.bb b/meta-oe/recipes-crypto/libkcapi/libkcapi_1.2.1.bb index 7de64fa0fe..e76fba09c3 100644 --- a/meta-oe/recipes-crypto/libkcapi/libkcapi_1.2.1.bb +++ b/meta-oe/recipes-crypto/libkcapi/libkcapi_1.2.1.bb | |||
@@ -7,7 +7,9 @@ DEPENDS = "libtool" | |||
7 | 7 | ||
8 | S = "${WORKDIR}/git" | 8 | S = "${WORKDIR}/git" |
9 | SRCREV = "d41284525ec8960e9a828979cfe269012b7df8db" | 9 | SRCREV = "d41284525ec8960e9a828979cfe269012b7df8db" |
10 | SRC_URI = "git://github.com/smuellerDD/libkcapi.git" | 10 | SRC_URI = "git://github.com/smuellerDD/libkcapi.git \ |
11 | file://0001-Disable-use-of-__NR_io_getevents-when-not-defined.patch \ | ||
12 | " | ||
11 | 13 | ||
12 | inherit autotools | 14 | inherit autotools |
13 | 15 | ||