Skip to content

Commit 9cb6249

Browse files
committed
tcp_wrap: update after libuv API change
1 parent 2aefea5 commit 9cb6249

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/tcp_wrap.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,10 @@ class TCPWrap : public StreamWrap {
127127

128128
UNWRAP
129129

130-
int namelen = sizeof(address);
131-
int r = uv_getsockname(&wrap->handle_, &address, &namelen);
130+
int addrlen = sizeof(address);
131+
int r = uv_getsockname(reinterpret_cast<uv_handle_t*>(&wrap->handle_),
132+
reinterpret_cast<sockaddr*>(&address),
133+
&addrlen);
132134

133135
Local<Object> sockname = Object::New();
134136
if (r != 0) {

0 commit comments

Comments
 (0)