Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Aug 24, 2011
1 parent f9dae9e commit 06f750c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions node.gyp
Expand Up @@ -46,6 +46,7 @@
'src/timer_wrap.cc',
'src/process_wrap.cc',
'src/v8_typed_array.cc',
'src/udp_wrap.cc',
],

'defines': [
Expand Down
4 changes: 2 additions & 2 deletions src/udp_wrap.cc
Expand Up @@ -372,15 +372,15 @@ 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));
break;

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));
Expand Down

0 comments on commit 06f750c

Please sign in to comment.