summaryrefslogtreecommitdiff
path: root/deps/uv/src/unix
diff options
context:
space:
mode:
authorcjihrig <cjihrig@gmail.com>2018-05-07 18:36:08 -0400
committercjihrig <cjihrig@gmail.com>2018-05-09 14:03:20 -0400
commit60349bbe0d90a91d66aa4ad71c4c2b0d3b08d54c (patch)
tree6c611abaae5dd56f885b05f134931bbc8a7ca67d /deps/uv/src/unix
parent2246c3c843efd32d8c573c0228bbc289a46c28b7 (diff)
downloadandroid-node-v8-60349bbe0d90a91d66aa4ad71c4c2b0d3b08d54c.tar.gz
android-node-v8-60349bbe0d90a91d66aa4ad71c4c2b0d3b08d54c.tar.bz2
android-node-v8-60349bbe0d90a91d66aa4ad71c4c2b0d3b08d54c.zip
deps: upgrade to libuv 1.20.3
Refs: https://github.com/nodejs/node/pull/19377 PR-URL: https://github.com/nodejs/node/pull/20585 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/uv/src/unix')
-rw-r--r--deps/uv/src/unix/internal.h12
-rw-r--r--deps/uv/src/unix/os390-syscalls.c2
2 files changed, 14 insertions, 0 deletions
diff --git a/deps/uv/src/unix/internal.h b/deps/uv/src/unix/internal.h
index b6df1ab9d3..63e478fd98 100644
--- a/deps/uv/src/unix/internal.h
+++ b/deps/uv/src/unix/internal.h
@@ -185,6 +185,18 @@ struct uv__stream_queued_fds_s {
#define uv__nonblock uv__nonblock_fcntl
#endif
+/* On Linux, uv__nonblock_fcntl() and uv__nonblock_ioctl() do not commute
+ * when O_NDELAY is not equal to O_NONBLOCK. Case in point: linux/sparc32
+ * and linux/sparc64, where O_NDELAY is O_NONBLOCK + another bit.
+ *
+ * Libuv uses uv__nonblock_fcntl() directly sometimes so ensure that it
+ * commutes with uv__nonblock().
+ */
+#if defined(__linux__) && O_NDELAY != O_NONBLOCK
+#undef uv__nonblock
+#define uv__nonblock uv__nonblock_fcntl
+#endif
+
/* core */
int uv__cloexec_ioctl(int fd, int set);
int uv__cloexec_fcntl(int fd, int set);
diff --git a/deps/uv/src/unix/os390-syscalls.c b/deps/uv/src/unix/os390-syscalls.c
index 21558ea868..a5dd34426d 100644
--- a/deps/uv/src/unix/os390-syscalls.c
+++ b/deps/uv/src/unix/os390-syscalls.c
@@ -215,6 +215,7 @@ uv__os390_epoll* epoll_create1(int flags) {
maybe_resize(lst, 1);
lst->items[lst->size - 1].fd = lst->msg_queue;
lst->items[lst->size - 1].events = POLLIN;
+ lst->items[lst->size - 1].revents = 0;
uv_once(&once, epoll_init);
uv_mutex_lock(&global_epoll_lock);
QUEUE_INSERT_TAIL(&global_epoll_queue, &lst->member);
@@ -252,6 +253,7 @@ int epoll_ctl(uv__os390_epoll* lst,
}
lst->items[fd].fd = fd;
lst->items[fd].events = event->events;
+ lst->items[fd].revents = 0;
} else if (op == EPOLL_CTL_MOD) {
if (fd >= lst->size || lst->items[fd].fd == -1) {
uv_mutex_unlock(&global_epoll_lock);