This internal function is used by uv__stream_fd macro on OSX, and uv__stream_fd is called inside uv_tcp_getsockname and uv_tcp_getpeername. If I leave it as is, we'll cast constness away, and I don't see why should we do it here.