From d776d378cdfa3add47670978a63eed28537cb12c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Sat, 25 Feb 2023 20:21:45 +0100 Subject: [PATCH] pipewire: module-protocol-simple: cast argument of `accept4()` With glibc omitting the cast does not trigger a warning because glibc uses GCC's `transparent_union` attribute. musl does not do that, so to avoid getting warnings there, add the cast. https://gcc.gnu.org/onlinedocs/gcc/Common-Type-Attributes.html#index-transparent_005funion-type-attribute --- src/modules/module-protocol-simple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/module-protocol-simple.c b/src/modules/module-protocol-simple.c index ad9169ef9..6fbaadd1e 100644 --- a/src/modules/module-protocol-simple.c +++ b/src/modules/module-protocol-simple.c @@ -523,7 +523,7 @@ on_connect(void *data, int fd, uint32_t mask) struct pw_properties *props = NULL; addrlen = sizeof(addr); - client_fd = accept4(fd, &addr, &addrlen, SOCK_NONBLOCK | SOCK_CLOEXEC); + client_fd = accept4(fd, (struct sockaddr *) &addr, &addrlen, SOCK_NONBLOCK | SOCK_CLOEXEC); if (client_fd < 0) goto error;