mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2025-12-16 15:25:53 +01:00
libwebsockets: Fix build with clang-20
Backport a needed patch from main branch upstream Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
parent
436b4fcc7e
commit
b19ff59668
|
|
@ -0,0 +1,29 @@
|
|||
From 99e3ad14c60599e5d73e4d5597c95c3b91780547 Mon Sep 17 00:00:00 2001
|
||||
From: Andy Green <andy@warmcat.com>
|
||||
Date: Wed, 22 Jan 2025 10:08:55 +0000
|
||||
Subject: [PATCH] sll_protocol may be be16
|
||||
|
||||
Google's fuzzer platform blows a warning
|
||||
|
||||
/src/libwebsockets/lib/plat/unix/unix-sockets.c:497:21: warning: implicit conversion loses integer precision: 'uint32_t' (aka 'unsigned int') to '__be16' (aka 'unsigned short') [-Wimplicit-int-conversion]
|
||||
497 | sll.sll_protocol = (uint32_t)(htons((uint16_t)0x800));
|
||||
|
||||
Upstream-Status: Backport [https://github.com/warmcat/libwebsockets/commit/2ffb8c6d5eaab509a133f3a6d922e170ae95dd59]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
lib/plat/unix/unix-sockets.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/plat/unix/unix-sockets.c b/lib/plat/unix/unix-sockets.c
|
||||
index 1a40c9cf..61292ff8 100644
|
||||
--- a/lib/plat/unix/unix-sockets.c
|
||||
+++ b/lib/plat/unix/unix-sockets.c
|
||||
@@ -453,7 +453,7 @@ lws_plat_rawudp_broadcast(uint8_t *p, const uint8_t *canned, size_t canned_len,
|
||||
|
||||
memset(&sll, 0, sizeof(sll));
|
||||
sll.sll_family = AF_PACKET;
|
||||
- sll.sll_protocol = (uint32_t)(htons((uint16_t)0x800));
|
||||
+ sll.sll_protocol = (uint16_t)(htons((uint16_t)0x800));
|
||||
sll.sll_halen = 6;
|
||||
sll.sll_ifindex = (int)if_nametoindex(iface);
|
||||
memset(sll.sll_addr, 0xff, 6);
|
||||
|
|
@ -8,7 +8,9 @@ DEPENDS:append:class-native = " libcap-native"
|
|||
|
||||
S = "${WORKDIR}/git"
|
||||
SRCREV = "ab9df9cfc39de7a49967f18387b6b76310947442"
|
||||
SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.3-stable"
|
||||
SRC_URI = "git://github.com/warmcat/libwebsockets.git;protocol=https;branch=v4.3-stable \
|
||||
file://0001-sll_protocol-may-be-be16.patch \
|
||||
"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/warmcat/${BPN}/releases"
|
||||
UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user