nbd-client: Fix build on musl + gcc14
commit4664b8dd3bc124c27b160720113339c1da97c2c4
authorKhem Raj <raj.khem@gmail.com>
Tue, 21 May 2024 00:50:51 +0000 (20 17:50 -0700)
committerWouter Verhelst <w@uter.be>
Thu, 25 Jul 2024 10:15:54 +0000 (25 12:15 +0200)
treef2b37dce2a8b5bcb7d54c8458f43c6bd96a24c5b
parentd294cda8438bc223e34185f43d12f16686090568
nbd-client: Fix build on musl + gcc14

GCC-14 has promoted incompatible-pointer-types warning into error which is
now flagged especially with when building on musl

Fixes following error

| ../nbd-3.26.1/nbd-client.c: In function 'openunix':
| ../nbd-3.26.1/nbd-client.c:345:27: error: passing argument 2 of 'connect' from incompatible pointer type [-Wincompatible-pointer-types]
|   345 |         if (connect(sock, &un_addr, sizeof(un_addr)) == -1) {
|       |                           ^~~~~~~~
|       |                           |
|       |                           struct sockaddr_un *
| In file included from ../nbd-3.26.1/nbd-client.c:25:
| /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 *'
|   386 | int connect (int, const struct sockaddr *, socklen_t);
|       |                   ^~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Khem Raj <raj.khem@gmail.com>
nbd-client.c