summaryrefslogtreecommitdiff
path: root/deps/uv/src/unix/stream.c
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2017-01-31 20:06:00 -0500
committercjihrig <cjihrig@gmail.com>2017-02-09 13:03:09 -0500
commit8514269876c4250e885a1b2407cfa7eb92498c0e (patch)
treef92827180e842283c68457a714480926032965f2 /deps/uv/src/unix/stream.c
parenta4bb9fdb893c8f2c36a6b77862e29b2608e080c2 (diff)
downloadandroid-node-v8-8514269876c4250e885a1b2407cfa7eb92498c0e.tar.gz
android-node-v8-8514269876c4250e885a1b2407cfa7eb92498c0e.tar.bz2
android-node-v8-8514269876c4250e885a1b2407cfa7eb92498c0e.zip
deps: upgrade libuv to 1.11.0
Fixes: https://github.com/nodejs/node/issues/10165 Fixes: https://github.com/nodejs/node/issues/9856 Fixes: https://github.com/nodejs/node/issues/10607 Fixes: https://github.com/nodejs/node/issues/11104 PR-URL: https://github.com/nodejs/node/pull/11094 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/uv/src/unix/stream.c')
-rw-r--r--deps/uv/src/unix/stream.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/deps/uv/src/unix/stream.c b/deps/uv/src/unix/stream.c
index 86f4eb7a5c..7059df16a6 100644
--- a/deps/uv/src/unix/stream.c
+++ b/deps/uv/src/unix/stream.c
@@ -390,7 +390,7 @@ failed_malloc:
int uv__stream_open(uv_stream_t* stream, int fd, int flags) {
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__MVS__)
int enable;
#endif
@@ -409,7 +409,7 @@ int uv__stream_open(uv_stream_t* stream, int fd, int flags) {
return -errno;
}
-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__MVS__)
enable = 1;
if (setsockopt(fd, SOL_SOCKET, SO_OOBINLINE, &enable, sizeof(enable)) &&
errno != ENOTSOCK &&
@@ -1194,6 +1194,30 @@ static void uv__read(uv_stream_t* stream) {
return;
}
}
+
+#if defined(__MVS__)
+ if (is_ipc && msg.msg_controllen > 0) {
+ uv_buf_t blankbuf;
+ int nread;
+ struct iovec *old;
+
+ blankbuf.base = 0;
+ blankbuf.len = 0;
+ old = msg.msg_iov;
+ msg.msg_iov = (struct iovec*) &blankbuf;
+ nread = 0;
+ do {
+ nread = uv__recvmsg(uv__stream_fd(stream), &msg, 0);
+ err = uv__stream_recv_cmsg(stream, &msg);
+ if (err != 0) {
+ stream->read_cb(stream, err, &buf);
+ msg.msg_iov = old;
+ return;
+ }
+ } while (nread == 0 && msg.msg_controllen > 0);
+ msg.msg_iov = old;
+ }
+#endif
stream->read_cb(stream, nread, &buf);
/* Return if we didn't fill the buffer, there is no more data to read. */