diff options
| -rw-r--r-- | meta-networking/recipes-support/nbd/nbd/0001-nbd-client-Fix-build-on-musl-gcc14.patch | 43 | ||||
| -rw-r--r-- | meta-networking/recipes-support/nbd/nbd_3.26.1.bb | 4 |
2 files changed, 46 insertions, 1 deletions
diff --git a/meta-networking/recipes-support/nbd/nbd/0001-nbd-client-Fix-build-on-musl-gcc14.patch b/meta-networking/recipes-support/nbd/nbd/0001-nbd-client-Fix-build-on-musl-gcc14.patch new file mode 100644 index 0000000000..15b439e255 --- /dev/null +++ b/meta-networking/recipes-support/nbd/nbd/0001-nbd-client-Fix-build-on-musl-gcc14.patch | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | From 909d20a2ee4afecd5ae4cc5950c8ee599f72972d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 20 May 2024 17:48:13 -0700 | ||
| 4 | Subject: [PATCH] nbd-client: Fix build on musl + gcc14 | ||
| 5 | |||
| 6 | GCC-14 has promoted incompatible-pointer-types warning into error which is | ||
| 7 | now flagged especially with when building on musl | ||
| 8 | |||
| 9 | Fixes following error | ||
| 10 | |||
| 11 | | ../nbd-3.26.1/nbd-client.c: In function 'openunix': | ||
| 12 | | ../nbd-3.26.1/nbd-client.c:345:27: error: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types] | ||
| 13 | | 345 | if (connect(sock, &un_addr, sizeof(un_addr)) == -1) { | ||
| 14 | | | ^~~~~~~~ | ||
| 15 | | | | | ||
| 16 | | | struct sockaddr_un * | ||
| 17 | | In file included from ../nbd-3.26.1/nbd-client.c:25: | ||
| 18 | | /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/nbd/3.26.1/recipe-sysroot/usr/include/sys/socket.h:386:19: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_un *' | ||
| 19 | | 386 | int connect (int, const struct sockaddr *, socklen_t); | ||
| 20 | | | ^~~~~~~~~~~~~~~~~~~~~~~ | ||
| 21 | |||
| 22 | Upstream-Status: Submitted [https://lists.debian.org/nbd/2024/05/msg00012.html] | ||
| 23 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 24 | --- | ||
| 25 | nbd-client.c | 2 +- | ||
| 26 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 27 | |||
| 28 | diff --git a/nbd-client.c b/nbd-client.c | ||
| 29 | index 8d1101b..7b25c67 100644 | ||
| 30 | --- a/nbd-client.c | ||
| 31 | +++ b/nbd-client.c | ||
| 32 | @@ -342,7 +342,7 @@ int openunix(const char *path) { | ||
| 33 | return -1; | ||
| 34 | }; | ||
| 35 | |||
| 36 | - if (connect(sock, &un_addr, sizeof(un_addr)) == -1) { | ||
| 37 | + if (connect(sock, (struct sockaddr*)&un_addr, sizeof(un_addr)) == -1) { | ||
| 38 | err_nonfatal("CONNECT failed"); | ||
| 39 | close(sock); | ||
| 40 | return -1; | ||
| 41 | -- | ||
| 42 | 2.45.1 | ||
| 43 | |||
diff --git a/meta-networking/recipes-support/nbd/nbd_3.26.1.bb b/meta-networking/recipes-support/nbd/nbd_3.26.1.bb index 15d5f8b36b..a67b087f74 100644 --- a/meta-networking/recipes-support/nbd/nbd_3.26.1.bb +++ b/meta-networking/recipes-support/nbd/nbd_3.26.1.bb | |||
| @@ -7,7 +7,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" | |||
| 7 | DEPENDS = "autoconf-archive bison-native glib-2.0 libnl zlib bison-native" | 7 | DEPENDS = "autoconf-archive bison-native glib-2.0 libnl zlib bison-native" |
| 8 | 8 | ||
| 9 | SRC_URI = "https://github.com/NetworkBlockDevice/${BPN}/releases/download/${BP}/${BP}.tar.xz \ | 9 | SRC_URI = "https://github.com/NetworkBlockDevice/${BPN}/releases/download/${BP}/${BP}.tar.xz \ |
| 10 | file://f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch" | 10 | file://f0418b0d8b54c21a1e5b0c6dce3277e938d07e7c.patch \ |
| 11 | file://0001-nbd-client-Fix-build-on-musl-gcc14.patch \ | ||
| 12 | " | ||
| 11 | SRC_URI[sha256sum] = "f0cf509fa5b20b1a07f7904eb637e9b47d3e30b6ed6f00075af5d8b701c78fef" | 13 | SRC_URI[sha256sum] = "f0cf509fa5b20b1a07f7904eb637e9b47d3e30b6ed6f00075af5d8b701c78fef" |
| 12 | 14 | ||
| 13 | inherit autotools pkgconfig systemd | 15 | inherit autotools pkgconfig systemd |
