Skip to content

Commit 571a519

Browse files
committed
Upgrade libuv to 66a959c4052
1 parent f631c1d commit 571a519

3 files changed

Lines changed: 12 additions & 8 deletions

File tree

deps/uv/src/unix/linux.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,16 @@ uint64_t uv_get_total_memory(void) {
170170
#if HAVE_INOTIFY_INIT || HAVE_INOTIFY_INIT1
171171

172172
static int new_inotify_fd(void) {
173-
#if HAVE_INOTIFY_INIT1
174-
return inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
175-
#else
176173
int fd;
177174

175+
#if HAVE_INOTIFY_INIT1
176+
fd = inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
177+
if (fd != -1)
178+
return fd;
179+
if (errno != ENOSYS)
180+
return -1;
181+
#endif
182+
178183
if ((fd = inotify_init()) == -1)
179184
return -1;
180185

@@ -184,7 +189,6 @@ static int new_inotify_fd(void) {
184189
}
185190

186191
return fd;
187-
#endif
188192
}
189193

190194

deps/uv/test/test-ref.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ static void write_unref_cb(uv_connect_t* req, int status) {
4545
ASSERT(status == 0);
4646

4747
uv_write(&write_req, req->handle, &buf, 1, (uv_write_cb) fail_cb);
48-
uv_unref(uv_default_loop()); // uv_write refs the loop
48+
uv_unref(uv_default_loop()); /* uv_write refs the loop */
4949
}
5050

5151

@@ -55,7 +55,7 @@ static void shutdown_unref_cb(uv_connect_t* req, int status) {
5555
ASSERT(status == 0);
5656

5757
uv_shutdown(&shutdown_req, req->handle, (uv_shutdown_cb) fail_cb);
58-
uv_unref(uv_default_loop()); // uv_shutdown refs the loop
58+
uv_unref(uv_default_loop()); /* uv_shutdown refs the loop */
5959
}
6060

6161

deps/uv/test/test-tty.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#ifdef _WIN32
2626
# include <io.h>
2727
# include <windows.h>
28-
#else // Unix
28+
#else /* Unix */
2929
# include <fcntl.h>
3030
# include <unistd.h>
3131
#endif
@@ -37,7 +37,7 @@ TEST_IMPL(tty) {
3737
uv_tty_t tty_in, tty_out;
3838
uv_loop_t* loop = uv_default_loop();
3939

40-
// Make sure we have an FD that refers to a tty
40+
/* Make sure we have an FD that refers to a tty */
4141
#ifdef _WIN32
4242
HANDLE handle;
4343
handle = CreateFileA("conin$",

0 commit comments

Comments
 (0)