diff options
Diffstat (limited to 'deps/uv/src/unix/kqueue.c')
-rw-r--r-- | deps/uv/src/unix/kqueue.c | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c index 1af2fbe34d..58988f9d1b 100644 --- a/deps/uv/src/unix/kqueue.c +++ b/deps/uv/src/unix/kqueue.c @@ -26,6 +26,8 @@ #include <string.h> #include <errno.h> +#if HAVE_KQUEUE + #include <sys/sysctl.h> #include <sys/types.h> #include <sys/event.h> @@ -119,9 +121,34 @@ int uv_fs_event_init(uv_loop_t* loop, } -void uv__fs_event_close(uv_fs_event_t* handle) { +void uv__fs_event_destroy(uv_fs_event_t* handle) { uv__fs_event_stop(handle); free(handle->filename); close(handle->fd); handle->fd = -1; } + +#else /* !HAVE_KQUEUE */ + +int uv_fs_event_init(uv_loop_t* loop, + uv_fs_event_t* handle, + const char* filename, + uv_fs_event_cb cb, + int flags) { + loop->counters.fs_event_init++; + uv__set_sys_error(loop, ENOSYS); + return -1; +} + + +void uv__fs_event_destroy(uv_fs_event_t* handle) { + UNREACHABLE(); +} + + +/* Called by libev, don't touch. */ +void uv__kqueue_hack(EV_P_ int fflags, ev_io *w) { + UNREACHABLE(); +} + +#endif /* HAVE_KQUEUE */ |