Skip to content

Commit 2e27d50

Browse files
authored
posix os_socket_inet_network: Use inet_addr instead of inet_network (#1133)
1 parent d9d0777 commit 2e27d50

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/shared/platform/common/posix/posix_socket.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ os_socket_inet_network(const char *cp, uint32 *out)
172172
if (!cp)
173173
return BHT_ERROR;
174174

175-
*out = inet_network(cp);
175+
/* Note: ntohl(INADDR_NONE) == INADDR_NONE */
176+
*out = ntohl(inet_addr(cp));
176177
return BHT_OK;
177-
}
178+
}

0 commit comments

Comments
 (0)