mirror of
https://github.com/warmcat/libwebsockets.git
synced 2025-03-09 00:00:04 +01:00
unix-sockets: extra care around short for some toolchains
https://github.com/warmcat/libwebsockets/issues/3163
This commit is contained in:
parent
a542eb0a3b
commit
6112189aac
1 changed files with 2 additions and 2 deletions
|
@ -482,7 +482,7 @@ lws_plat_rawudp_broadcast(uint8_t *p, const uint8_t *canned, size_t canned_len,
|
|||
p[3] = (uint8_t)(n);
|
||||
|
||||
while (p16 < (uint16_t *)(p + 20))
|
||||
ucs += ntohs(*p16++);
|
||||
ucs = ucs + (uint32_t)(ntohs((uint16_t)(*p16++)));
|
||||
|
||||
ucs += ucs >> 16;
|
||||
ucs ^= 0xffff;
|
||||
|
@ -494,7 +494,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 = htons(0x800);
|
||||
sll.sll_protocol = (uint32_t)(htons((uint16_t)0x800));
|
||||
sll.sll_halen = 6;
|
||||
sll.sll_ifindex = (int)if_nametoindex(iface);
|
||||
memset(sll.sll_addr, 0xff, 6);
|
||||
|
|
Loading…
Add table
Reference in a new issue