diff options
author | Brad King <brad.king@kitware.com> | 2020-04-06 15:58:14 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-04-06 15:58:14 (GMT) |
commit | 722d6b41053c6f143e10468d2ea25146a3dcf7a5 (patch) | |
tree | 1cd58dcc2f2a255d6cc388f45d4883b0757d262a /Utilities/cmlibuv/src/unix/pipe.c | |
parent | 21c5a311c60da34d4e66a1d1a778106110f9b5d2 (diff) | |
parent | 394b07af40e1bdbdca0033e53ca803585454da18 (diff) | |
download | CMake-722d6b41053c6f143e10468d2ea25146a3dcf7a5.zip CMake-722d6b41053c6f143e10468d2ea25146a3dcf7a5.tar.gz CMake-722d6b41053c6f143e10468d2ea25146a3dcf7a5.tar.bz2 |
Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv:
libuv 2020-04-06 (d21f5aea)
Diffstat (limited to 'Utilities/cmlibuv/src/unix/pipe.c')
-rw-r--r-- | Utilities/cmlibuv/src/unix/pipe.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Utilities/cmlibuv/src/unix/pipe.c b/Utilities/cmlibuv/src/unix/pipe.c index 7d97550..52a8fd5 100644 --- a/Utilities/cmlibuv/src/unix/pipe.c +++ b/Utilities/cmlibuv/src/unix/pipe.c @@ -93,8 +93,12 @@ int uv_pipe_listen(uv_pipe_t* handle, int backlog, uv_connection_cb cb) { if (uv__stream_fd(handle) == -1) return UV_EINVAL; -#if defined(__MVS__) + if (handle->ipc) + return UV_EINVAL; + +#if defined(__MVS__) || defined(__PASE__) /* On zOS, backlog=0 has undefined behaviour */ + /* On IBMi PASE, backlog=0 leads to "Connection refused" error */ if (backlog == 0) backlog = 1; else if (backlog < 0) @@ -259,7 +263,7 @@ static int uv__pipe_getsockpeername(const uv_pipe_t* handle, addrlen = strlen(sa.sun_path); - if (addrlen >= *size) { + if ((size_t)addrlen >= *size) { *size = addrlen + 1; return UV_ENOBUFS; } |