diff --git a/src/stream_wrap.cc b/src/stream_wrap.cc index 695e917e027604..b942e48078e29a 100644 --- a/src/stream_wrap.cc +++ b/src/stream_wrap.cc @@ -86,7 +86,7 @@ int StreamWrap::GetFD() { int fd = -1; #if !defined(_WIN32) if (stream() != nullptr) - fd = stream()->io_watcher.fd; + uv_fileno(reinterpret_cast(stream()), &fd); #endif return fd; }