summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2024-05-17 18:19:49 -0700
committerKhem Raj <raj.khem@gmail.com>2024-05-19 08:28:01 -0700
commitebae86d9ddb5c5a6bed34de2fc46b5ace49f8e8f (patch)
tree6f235840780b3224783637d2fd817c940f57ab3c /meta-oe/recipes-connectivity
parent1429a784c7da835f11b9d5aa144d05a63e3d953a (diff)
downloadmeta-openembedded-ebae86d9ddb5c5a6bed34de2fc46b5ace49f8e8f.tar.gz
libndp: Fix build with gcc-14/musl
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-connectivity')
-rw-r--r--meta-oe/recipes-connectivity/libndp/libndp/0001-libndp-Fix-signature-of-sendto-API.patch40
-rw-r--r--meta-oe/recipes-connectivity/libndp/libndp_1.8.bb1
2 files changed, 41 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/libndp/libndp/0001-libndp-Fix-signature-of-sendto-API.patch b/meta-oe/recipes-connectivity/libndp/libndp/0001-libndp-Fix-signature-of-sendto-API.patch
new file mode 100644
index 000000000..f625416ac
--- /dev/null
+++ b/meta-oe/recipes-connectivity/libndp/libndp/0001-libndp-Fix-signature-of-sendto-API.patch
@@ -0,0 +1,40 @@
1From 14e036b5daf6b72483a1a21054b5133acabceabe Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 17 May 2024 18:14:04 -0700
4Subject: [PATCH] libndp: Fix signature of sendto API
5
6This fixes build with musl/gcc-14
7
8| ../../git/libndp/libndp.c: In function 'mysendto6':
9| ../../git/libndp/libndp.c:212:50: error: passing argument 5 of 'sendto' from incompatible pointer type [-Wincompatible-pointer-types]
10| 212 | ret = sendto(sockfd, buf, buflen, flags, &sin6, sizeof(sin6));
11| | ^~~~~
12| | |
13| | struct sockaddr_in6 *
14| In file included from ../../git/libndp/libndp.c:27:
15| /mnt/b/yoe/master/build/tmp/work/core2-64-yoe-linux-musl/libndp/1.8/recipe-sysroot/usr/include/sys/socket.h:396:49: note: expected 'const struct sockaddr *' but argument is of type 'struct sockaddr_in6 *'
16| 396 | ssize_t sendto (int, const void *, size_t, int, const struct sockaddr *, socklen_t);
17| | ^~~~~~~~~~~~~~~~~~~~~~~
18
19Upstream-Status: Submitted [Sent to maintainer]
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21---
22 libndp/libndp.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
24
25diff --git a/libndp/libndp.c b/libndp/libndp.c
26index 6314717..056df0f 100644
27--- a/libndp/libndp.c
28+++ b/libndp/libndp.c
29@@ -209,7 +209,7 @@ static int mysendto6(int sockfd, void *buf, size_t buflen, int flags,
30 memcpy(&sin6.sin6_addr, addr, sizeof(sin6.sin6_addr));
31 sin6.sin6_scope_id = ifindex;
32 resend:
33- ret = sendto(sockfd, buf, buflen, flags, &sin6, sizeof(sin6));
34+ ret = sendto(sockfd, buf, buflen, flags, (struct sockaddr*)&sin6, sizeof(sin6));
35 if (ret == -1) {
36 switch(errno) {
37 case EINTR:
38--
392.45.1
40
diff --git a/meta-oe/recipes-connectivity/libndp/libndp_1.8.bb b/meta-oe/recipes-connectivity/libndp/libndp_1.8.bb
index 4d4d3e51c..80946317e 100644
--- a/meta-oe/recipes-connectivity/libndp/libndp_1.8.bb
+++ b/meta-oe/recipes-connectivity/libndp/libndp_1.8.bb
@@ -4,6 +4,7 @@ LICENSE = "LGPL-2.1-only"
4LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c" 4LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
5 5
6SRC_URI = "git://github.com/jpirko/libndp;branch=master;protocol=https \ 6SRC_URI = "git://github.com/jpirko/libndp;branch=master;protocol=https \
7 file://0001-libndp-Fix-signature-of-sendto-API.patch \
7 " 8 "
8# tag for v1.8 9# tag for v1.8
9SRCREV = "009ce9cd9b950ffa1f4f94c9436027b936850d0c" 10SRCREV = "009ce9cd9b950ffa1f4f94c9436027b936850d0c"