From 2e27d506d835b984c0242522975a82c7738145b4 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Takashi Date: Thu, 28 Apr 2022 14:53:01 +0900 Subject: [PATCH] posix os_socket_inet_network: Use inet_addr instead of inet_network (#1133) --- core/shared/platform/common/posix/posix_socket.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/shared/platform/common/posix/posix_socket.c b/core/shared/platform/common/posix/posix_socket.c index fb8c9ceb3..d3bcf148f 100644 --- a/core/shared/platform/common/posix/posix_socket.c +++ b/core/shared/platform/common/posix/posix_socket.c @@ -172,6 +172,7 @@ os_socket_inet_network(const char *cp, uint32 *out) if (!cp) return BHT_ERROR; - *out = inet_network(cp); + /* Note: ntohl(INADDR_NONE) == INADDR_NONE */ + *out = ntohl(inet_addr(cp)); return BHT_OK; -} \ No newline at end of file +}