Fix build socket api error (#1610)

Fix build socket api error introduced by #1590
This commit is contained in:
Wenyong Huang 2022-10-17 15:54:03 +08:00 committed by GitHub
parent 6f04f115ab
commit 7cc7b56f88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,7 +93,7 @@ wasi_addr_to_sockaddr(const __wasi_addr_t *wasi_addr,
struct sockaddr_in sock_addr_in;
uint32_t s_addr;
memset(&sock_addr_in, 0, sizeof(sockaddr_in));
memset(&sock_addr_in, 0, sizeof(sock_addr_in));
s_addr = (wasi_addr->addr.ip4.addr.n0 << 24)
| (wasi_addr->addr.ip4.addr.n1 << 16)
@ -112,7 +112,7 @@ wasi_addr_to_sockaddr(const __wasi_addr_t *wasi_addr,
{
struct sockaddr_in6 sock_addr_in6;
memset(&sock_addr_in6, 0, sizeof(sockaddr_in6));
memset(&sock_addr_in6, 0, sizeof(sock_addr_in6));
uint16_t *addr_buf = (uint16_t *)sock_addr_in6.sin6_addr.s6_addr;