windows: replace use of inet_addr with uv_inet_pton
Fixes a compilation warning with Visual Studio 2013.
This commit is contained in:
parent
4c90cc8e14
commit
b53aeb491a
@ -572,7 +572,9 @@ static int uv__udp_set_membership4(uv_udp_t* handle,
|
||||
memset(&mreq, 0, sizeof mreq);
|
||||
|
||||
if (interface_addr) {
|
||||
mreq.imr_interface.s_addr = inet_addr(interface_addr);
|
||||
err = uv_inet_pton(AF_INET, interface_addr, &mreq.imr_interface.s_addr);
|
||||
if (err)
|
||||
return err;
|
||||
} else {
|
||||
mreq.imr_interface.s_addr = htonl(INADDR_ANY);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user