diff options
author | Brad King <brad.king@kitware.com> | 2018-05-07 15:48:01 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-05-07 15:48:01 (GMT) |
commit | 42fbb285161a7424116a1e838b29741864ab3691 (patch) | |
tree | 858d1d7aa84098ce326d32c41da9047d9cd95064 /Utilities/cmlibuv/src/unix/kqueue.c | |
parent | dd3e1a737216b7c9bfb6c7569685b36a1bff9cba (diff) | |
parent | c8b67ea119c4000018238f6c3201a1364356d93a (diff) | |
download | CMake-42fbb285161a7424116a1e838b29741864ab3691.zip CMake-42fbb285161a7424116a1e838b29741864ab3691.tar.gz CMake-42fbb285161a7424116a1e838b29741864ab3691.tar.bz2 |
Merge branch 'upstream-libuv' into update-libuv
* upstream-libuv:
libuv 2018-05-06 (bf605bd7)
Diffstat (limited to 'Utilities/cmlibuv/src/unix/kqueue.c')
-rw-r--r-- | Utilities/cmlibuv/src/unix/kqueue.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Utilities/cmlibuv/src/unix/kqueue.c b/Utilities/cmlibuv/src/unix/kqueue.c index 5e89bdc..a30fd73 100644 --- a/Utilities/cmlibuv/src/unix/kqueue.c +++ b/Utilities/cmlibuv/src/unix/kqueue.c @@ -51,7 +51,7 @@ static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags); int uv__kqueue_init(uv_loop_t* loop) { loop->backend_fd = kqueue(); if (loop->backend_fd == -1) - return -errno; + return UV__ERR(errno); uv__cloexec(loop->backend_fd, 1); @@ -98,7 +98,7 @@ int uv__io_check_fd(uv_loop_t* loop, int fd) { rc = 0; EV_SET(&ev, fd, EVFILT_READ, EV_ADD, 0, 0, 0); if (kevent(loop->backend_fd, &ev, 1, NULL, 0, NULL)) - rc = -errno; + rc = UV__ERR(errno); EV_SET(&ev, fd, EVFILT_READ, EV_DELETE, 0, 0, 0); if (rc == 0) @@ -458,12 +458,12 @@ int uv_fs_event_start(uv_fs_event_t* handle, int fd; if (uv__is_active(handle)) - return -EINVAL; + return UV_EINVAL; /* TODO open asynchronously - but how do we report back errors? */ fd = open(path, O_RDONLY); if (fd == -1) - return -errno; + return UV__ERR(errno); uv__handle_start(handle); uv__io_init(&handle->event_watcher, uv__fs_event, fd); |