Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
uv: upgrade to 47d22ac
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Oct 11, 2011
1 parent 24dabec commit c215262
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions deps/uv/src/unix/kqueue.c
Expand Up @@ -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>
Expand Down Expand Up @@ -85,7 +87,6 @@ int uv_fs_event_init(uv_loop_t* loop,
uv_fs_event_t* handle,
const char* filename,
uv_fs_event_cb cb) {
#if HAVE_KQUEUE
int fd;

if (cb == NULL) {
Expand All @@ -107,10 +108,6 @@ int uv_fs_event_init(uv_loop_t* loop,
uv__fs_event_start(handle);

return 0;
#else
uv__set_sys_error(loop, ENOSYS);
return -1;
#endif
}


Expand All @@ -119,3 +116,26 @@ void uv__fs_event_destroy(uv_fs_event_t* handle) {
uv__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) {
uv__set_sys_error(loop, ENOSYS);
return -1;
}


void uv__fs_event_destroy(uv_fs_event_t* handle) {
assert(0 && "unreachable");
}


/* Called by libev, don't touch. */
void uv__kqueue_hack(EV_P_ int fflags, ev_io *w) {
assert(0 && "unreachable");
}

#endif /* HAVE_KQUEUE */

0 comments on commit c215262

Please sign in to comment.