Browse Source

fix windows build

Ryan Dahl 14 years ago
parent
commit
06f750c466
  1. 1
      node.gyp
  2. 4
      src/udp_wrap.cc

1
node.gyp

@ -46,6 +46,7 @@
'src/timer_wrap.cc',
'src/process_wrap.cc',
'src/v8_typed_array.cc',
'src/udp_wrap.cc',
],
'defines': [

4
src/udp_wrap.cc

@ -372,7 +372,7 @@ void AddressToJS(Handle<Object> info,
switch (addr->sa_family) {
case AF_INET6:
a6 = reinterpret_cast<const sockaddr_in6*>(addr);
inet_ntop(AF_INET6, &a6->sin6_addr, ip, sizeof ip);
uv_inet_ntop(AF_INET6, &a6->sin6_addr, ip, sizeof ip);
port = ntohs(a6->sin6_port);
info->Set(address_symbol, String::New(ip));
info->Set(port_symbol, Integer::New(port));
@ -380,7 +380,7 @@ void AddressToJS(Handle<Object> info,
case AF_INET:
a4 = reinterpret_cast<const sockaddr_in*>(addr);
inet_ntop(AF_INET, &a4->sin_addr, ip, sizeof ip);
uv_inet_ntop(AF_INET, &a4->sin_addr, ip, sizeof ip);
port = ntohs(a4->sin_port);
info->Set(address_symbol, String::New(ip));
info->Set(port_symbol, Integer::New(port));

Loading…
Cancel
Save