diff options
Diffstat (limited to 'deps/uv/src/unix/tty.c')
-rw-r--r-- | deps/uv/src/unix/tty.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/deps/uv/src/unix/tty.c b/deps/uv/src/unix/tty.c index 54c9055a08..7cc5b714ed 100644 --- a/deps/uv/src/unix/tty.c +++ b/deps/uv/src/unix/tty.c @@ -236,6 +236,15 @@ uv_handle_type uv_guess_handle(uv_file file) { return UV_UDP; if (type == SOCK_STREAM) { +#if defined(_AIX) + /* on AIX the getsockname call returns an empty sa structure + * for sockets of type AF_UNIX. For all other types it will + * return a properly filled in structure. + */ + if (len == 0) + return UV_NAMED_PIPE; +#endif /* defined(_AIX) */ + if (sa.sa_family == AF_INET || sa.sa_family == AF_INET6) return UV_TCP; if (sa.sa_family == AF_UNIX) |