diff --git a/src/unix/internal.h b/src/unix/internal.h index e4ff91b8..fd29b88d 100644 --- a/src/unix/internal.h +++ b/src/unix/internal.h @@ -241,8 +241,8 @@ void uv__udp_finish_close(uv_udp_t* handle); uv_handle_type uv__handle_type(int fd); #if defined(__APPLE__) -int uv___stream_fd(uv_stream_t* handle); -#define uv__stream_fd(handle) (uv___stream_fd((uv_stream_t*) (handle))) +int uv___stream_fd(const uv_stream_t* handle); +#define uv__stream_fd(handle) (uv___stream_fd((const uv_stream_t*) (handle))) #else #define uv__stream_fd(handle) ((handle)->io_watcher.fd) #endif /* defined(__APPLE__) */ diff --git a/src/unix/stream.c b/src/unix/stream.c index e1f66030..ac943ec6 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -1482,8 +1482,8 @@ int uv_is_writable(const uv_stream_t* stream) { #if defined(__APPLE__) -int uv___stream_fd(uv_stream_t* handle) { - uv__stream_select_t* s; +int uv___stream_fd(const uv_stream_t* handle) { + const uv__stream_select_t* s; assert(handle->type == UV_TCP || handle->type == UV_TTY ||