diff --git a/package/libteam/0001-teamd-Pass-correct-parameter-type-to-accept-API.patch b/package/libteam/0001-teamd-Pass-correct-parameter-type-to-accept-API.patch new file mode 100644 index 0000000000..0d9cf9b8a0 --- /dev/null +++ b/package/libteam/0001-teamd-Pass-correct-parameter-type-to-accept-API.patch @@ -0,0 +1,40 @@ +From 4eb54a811bef43da2be9cc84009567e5d6ca9741 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sat, 11 May 2024 23:15:59 -0700 +Subject: [PATCH] teamd: Pass correct parameter type to accept API + +accept() expects sockaddr as second parameter + +int accept (int, struct sockaddr *__restrict, socklen_t *__restrict); + +Fixes build with gcc-16 on musl systems +| ../../git/teamd/teamd_usock.c: In function 'callback_usock': +| ../../git/teamd/teamd_usock.c:280:40: error: passing argument 2 of 'accept' from incompatible pointer type [-Wincompatible-pointer-types] +| 280 | sock = accept(ctx->usock.sock, &addr, &alen); +| | ^~~~~ +| | | +| | struct sockaddr_un * + +Signed-off-by: Khem Raj +Signed-off-by: Jiri Pirko + +Upstream: https://github.com/jpirko/libteam/commit/4eb54a811bef43da2be9cc84009567e5d6ca9741 + +Signed-off-by: Bernd Kuhls +--- + teamd/teamd_usock.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/teamd/teamd_usock.c b/teamd/teamd_usock.c +index 1adfdf8..5895124 100644 +--- a/teamd/teamd_usock.c ++++ b/teamd/teamd_usock.c +@@ -277,7 +277,7 @@ static int callback_usock(struct teamd_context *ctx, int events, void *priv) + int err; + + alen = sizeof(addr); +- sock = accept(ctx->usock.sock, &addr, &alen); ++ sock = accept(ctx->usock.sock, (struct sockaddr *)&addr, &alen); + if (sock == -1) { + teamd_log_err("usock: Failed to accept connection."); + return -errno;