diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-10-07 17:52:37 -0700 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2023-10-12 09:58:06 -0400 |
| commit | d2bc55848ea123a0b401904b80441fafd16c3205 (patch) | |
| tree | f6b67aa7c42eb73a82c942f45a07dfae96b0f634 | |
| parent | 8ebd46ece806a1db9299c334d99cbc5bc802e6af (diff) | |
| download | meta-openembedded-d2bc55848ea123a0b401904b80441fafd16c3205.tar.gz | |
libnvme: Fix test builds on musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Christophe Vu-Brugier <christophe.vu-brugier@seagate.com>
(cherry picked from commit 29644952a6555849274b8ef8a8bd9fba2658dd76)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
| -rw-r--r-- | meta-oe/recipes-support/libnvme/libnvme/0001-ioctl-Check-for-ioctl-signature-for-musl.patch | 38 | ||||
| -rw-r--r-- | meta-oe/recipes-support/libnvme/libnvme_1.6.bb | 4 |
2 files changed, 41 insertions, 1 deletions
diff --git a/meta-oe/recipes-support/libnvme/libnvme/0001-ioctl-Check-for-ioctl-signature-for-musl.patch b/meta-oe/recipes-support/libnvme/libnvme/0001-ioctl-Check-for-ioctl-signature-for-musl.patch new file mode 100644 index 0000000000..06f7b57121 --- /dev/null +++ b/meta-oe/recipes-support/libnvme/libnvme/0001-ioctl-Check-for-ioctl-signature-for-musl.patch | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | From ad1ac4215f051bd42b7ddf64dad63d8215cc3ac4 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 7 Oct 2023 17:50:54 -0700 | ||
| 4 | Subject: [PATCH] ioctl: Check for ioctl signature for musl | ||
| 5 | |||
| 6 | Fixes | ||
| 7 | ../git/test/ioctl/mock.c:117:5: error: conflicting types for 'ioctl' | ||
| 8 | 117 | int ioctl(int fd, unsigned long request, ...) | ||
| 9 | | ^ | ||
| 10 | /mnt/b/yoe/master/build/tmp/work/cortexa15t2hf-neon-yoe-linux-musleabi/libnvme/1.6/recipe-sysroot/usr/include/sys/ioctl.h:115:5: note: previous declaration is here | ||
| 11 | 115 | int ioctl (int, int, ...); | ||
| 12 | | ^ | ||
| 13 | |||
| 14 | Upstream-Status: Pending | ||
| 15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 16 | --- | ||
| 17 | test/ioctl/mock.c | 4 ++++ | ||
| 18 | 1 file changed, 4 insertions(+) | ||
| 19 | |||
| 20 | diff --git a/test/ioctl/mock.c b/test/ioctl/mock.c | ||
| 21 | index e917244..7d5c983 100644 | ||
| 22 | --- a/test/ioctl/mock.c | ||
| 23 | +++ b/test/ioctl/mock.c | ||
| 24 | @@ -114,7 +114,11 @@ void end_mock_cmds(void) | ||
| 25 | } \ | ||
| 26 | }) | ||
| 27 | |||
| 28 | +#if defined(__linux__) && !defined(__GLIBC__) | ||
| 29 | +int ioctl(int fd, int request, ...) | ||
| 30 | +#else | ||
| 31 | int ioctl(int fd, unsigned long request, ...) | ||
| 32 | +#endif | ||
| 33 | { | ||
| 34 | struct mock_cmds *mock_cmds; | ||
| 35 | bool result64; | ||
| 36 | -- | ||
| 37 | 2.42.0 | ||
| 38 | |||
diff --git a/meta-oe/recipes-support/libnvme/libnvme_1.6.bb b/meta-oe/recipes-support/libnvme/libnvme_1.6.bb index 37e5d63011..26ad36d7d0 100644 --- a/meta-oe/recipes-support/libnvme/libnvme_1.6.bb +++ b/meta-oe/recipes-support/libnvme/libnvme_1.6.bb | |||
| @@ -13,7 +13,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c \ | |||
| 13 | DEPENDS = "json-c" | 13 | DEPENDS = "json-c" |
| 14 | SRCREV = "37a803cf77e224f66d86b1e1d9e74a15f55ea600" | 14 | SRCREV = "37a803cf77e224f66d86b1e1d9e74a15f55ea600" |
| 15 | 15 | ||
| 16 | SRC_URI = "git://github.com/linux-nvme/libnvme;protocol=https;branch=master" | 16 | SRC_URI = "git://github.com/linux-nvme/libnvme;protocol=https;branch=master \ |
| 17 | file://0001-ioctl-Check-for-ioctl-signature-for-musl.patch \ | ||
| 18 | " | ||
| 17 | 19 | ||
| 18 | S = "${WORKDIR}/git" | 20 | S = "${WORKDIR}/git" |
| 19 | 21 | ||
