diff options
author | Brad King <brad.king@kitware.com> | 2017-05-26 17:33:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-05-26 17:33:41 (GMT) |
commit | 1ebb421bfc8eb21a4e5e56e501a62d000a9f59db (patch) | |
tree | af67fb0fc045f87b37b891b495ff48e58262283b /Utilities/cmlibuv/src/unix/pipe.c | |
parent | bc407ba6ba28293b5fc0025fa08e8fe71365eab8 (diff) | |
parent | 362435f02a52008a90a1c19862f09b01f1b5bd7f (diff) | |
download | CMake-1ebb421bfc8eb21a4e5e56e501a62d000a9f59db.zip CMake-1ebb421bfc8eb21a4e5e56e501a62d000a9f59db.tar.gz CMake-1ebb421bfc8eb21a4e5e56e501a62d000a9f59db.tar.bz2 |
Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv:
libuv 2017-05-25 (dc596109)
Diffstat (limited to 'Utilities/cmlibuv/src/unix/pipe.c')
-rw-r--r-- | Utilities/cmlibuv/src/unix/pipe.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Utilities/cmlibuv/src/unix/pipe.c b/Utilities/cmlibuv/src/unix/pipe.c index 023e965..7ba1bf8 100644 --- a/Utilities/cmlibuv/src/unix/pipe.c +++ b/Utilities/cmlibuv/src/unix/pipe.c @@ -179,6 +179,14 @@ void uv_pipe_connect(uv_connect_t* req, if (r == -1 && errno != EINPROGRESS) { err = -errno; +#if defined(__CYGWIN__) || defined(__MSYS__) + /* EBADF is supposed to mean that the socket fd is bad, but + Cygwin reports EBADF instead of ENOTSOCK when the file is + not a socket. We do not expect to see a bad fd here + (e.g. due to new_sock), so translate the error. */ + if (err == -EBADF) + err = -ENOTSOCK; +#endif goto out; } |