diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-11-14 16:25:37 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2020-11-15 12:25:53 -0800 |
commit | a3015b7b235c06ffca10d2c669d45786b5023af9 (patch) | |
tree | f986628c5b764e647a11baa829596f3e42b9dba9 | |
parent | 512712f9c4b5eb4f9a1280fe7dbe06089e547ac3 (diff) | |
download | meta-openembedded-a3015b7b235c06ffca10d2c669d45786b5023af9.tar.gz |
liburing: Fix build on 32-bit arches with 64-bit time_t
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-oe/recipes-support/liburing/liburing/0001-test-Fix-build-on-32bit-architectures-with-6bit-time.patch | 35 | ||||
-rw-r--r-- | meta-oe/recipes-support/liburing/liburing_0.7.bb | 4 |
2 files changed, 38 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/liburing/liburing/0001-test-Fix-build-on-32bit-architectures-with-6bit-time.patch b/meta-oe/recipes-support/liburing/liburing/0001-test-Fix-build-on-32bit-architectures-with-6bit-time.patch new file mode 100644 index 0000000000..01c5ccd53a --- /dev/null +++ b/meta-oe/recipes-support/liburing/liburing/0001-test-Fix-build-on-32bit-architectures-with-6bit-time.patch | |||
@@ -0,0 +1,35 @@ | |||
1 | From 0a9b12eda0f6e487398dad004121bdd1be792428 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sat, 14 Nov 2020 16:18:44 -0800 | ||
4 | Subject: [PATCH] test: Fix build on 32bit architectures with 6bit time_t | ||
5 | |||
6 | It uses SYS_futex, which it expects from system C library. | ||
7 | in glibc (/usr/include/bits/syscall.h defines it in terms of of NR_futex) | ||
8 | rv32 is using 64bit time_t from get go unlike other 32bit architectures | ||
9 | in glibc, therefore it wont have NR_futex defined but just NR_futex_time64 | ||
10 | this aliases it to NR_futex so that SYS_futex is then defined for rv32 | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/axboe/liburing/pull/237] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | test/35fa71a030ca-test.c | 4 ++++ | ||
16 | 1 file changed, 4 insertions(+) | ||
17 | |||
18 | diff --git a/test/35fa71a030ca-test.c b/test/35fa71a030ca-test.c | ||
19 | index 4ecf211..7f2124b 100644 | ||
20 | --- a/test/35fa71a030ca-test.c | ||
21 | +++ b/test/35fa71a030ca-test.c | ||
22 | @@ -24,6 +24,10 @@ | ||
23 | |||
24 | #include <linux/futex.h> | ||
25 | |||
26 | +#if !defined(SYS_futex) && defined(SYS_futex_time64) | ||
27 | +# define SYS_futex SYS_futex_time64 | ||
28 | +#endif | ||
29 | + | ||
30 | static void sleep_ms(uint64_t ms) | ||
31 | { | ||
32 | usleep(ms * 1000); | ||
33 | -- | ||
34 | 2.29.2 | ||
35 | |||
diff --git a/meta-oe/recipes-support/liburing/liburing_0.7.bb b/meta-oe/recipes-support/liburing/liburing_0.7.bb index 3a1eaef873..e122a907cd 100644 --- a/meta-oe/recipes-support/liburing/liburing_0.7.bb +++ b/meta-oe/recipes-support/liburing/liburing_0.7.bb | |||
@@ -9,7 +9,9 @@ SECTION = "libs" | |||
9 | LICENSE = "LGPLv2.1 | MIT" | 9 | LICENSE = "LGPLv2.1 | MIT" |
10 | LIC_FILES_CHKSUM = "file://README;beginline=41;endline=44;md5=d51b5805e2a675685e6a66ca50904cf9" | 10 | LIC_FILES_CHKSUM = "file://README;beginline=41;endline=44;md5=d51b5805e2a675685e6a66ca50904cf9" |
11 | 11 | ||
12 | SRC_URI = "git://github.com/axboe/liburing.git;branch=master;protocol=https" | 12 | SRC_URI = "git://github.com/axboe/liburing.git;branch=master;protocol=https \ |
13 | file://0001-test-Fix-build-on-32bit-architectures-with-6bit-time.patch \ | ||
14 | " | ||
13 | SRCREV = "45f0735219a615ae848033c47c7e2d85d101d43e" | 15 | SRCREV = "45f0735219a615ae848033c47c7e2d85d101d43e" |
14 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |
15 | 17 | ||