posix os_socket_inet_network: Use inet_addr instead of inet_network (#1133)

This commit is contained in:
YAMAMOTO Takashi 2022-04-28 14:53:01 +09:00 committed by GitHub
parent d9d0777051
commit 2e27d506d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -172,6 +172,7 @@ os_socket_inet_network(const char *cp, uint32 *out)
if (!cp) if (!cp)
return BHT_ERROR; return BHT_ERROR;
*out = inet_network(cp); /* Note: ntohl(INADDR_NONE) == INADDR_NONE */
*out = ntohl(inet_addr(cp));
return BHT_OK; return BHT_OK;
} }