Skip to content

Commit 37fd953

Browse files
committed
uv: Cherry-pick joyent/libuv@3c41597
1 parent 079b813 commit 37fd953

File tree

4 files changed

+26
-29
lines changed

4 files changed

+26
-29
lines changed

deps/uv/include/uv-private/uv-unix.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ typedef void* uv_lib_t;
223223
ev_io read_watcher; \
224224
uv_fs_event_cb cb;
225225

226-
#elif (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060) \
226+
#elif defined(__APPLE__) \
227227
|| defined(__FreeBSD__) \
228228
|| defined(__OpenBSD__) \
229229
|| defined(__NetBSD__)

deps/uv/src/unix/ev/ev_kqueue.c

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,30 @@
4343
#include <string.h>
4444
#include <errno.h>
4545

46+
/* These are the same on OS X and the BSDs. */
47+
#ifndef NOTE_DELETE
48+
# define NOTE_DELETE 0x01
49+
#endif
50+
#ifndef NOTE_WRITE
51+
# define NOTE_WRITE 0x02
52+
#endif
53+
#ifndef NOTE_EXTEND
54+
# define NOTE_EXTEND 0x04
55+
#endif
56+
#ifndef NOTE_ATTRIB
57+
# define NOTE_ATTRIB 0x08
58+
#endif
59+
#ifndef NOTE_LINK
60+
# define NOTE_LINK 0x10
61+
#endif
62+
#ifndef NOTE_RENAME
63+
# define NOTE_RENAME 0x20
64+
#endif
65+
#ifndef NOTE_REVOKE
66+
# define NOTE_REVOKE 0x40
67+
#endif
68+
69+
4670
extern void
4771
uv__kqueue_hack (EV_P_ int fflags, ev_io *w);
4872

deps/uv/src/unix/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ inline static int sys_accept4(int fd,
125125
#endif
126126

127127
/* FIXME exact copy of the #ifdef guard in uv-unix.h */
128-
#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060) \
128+
#if defined(__APPLE__) \
129129
|| defined(__FreeBSD__) \
130130
|| defined(__OpenBSD__) \
131131
|| defined(__NetBSD__)

deps/uv/src/unix/kqueue.c

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#include <string.h>
2727
#include <errno.h>
2828

29-
#if HAVE_KQUEUE
30-
3129
#include <sys/sysctl.h>
3230
#include <sys/types.h>
3331
#include <sys/event.h>
@@ -127,28 +125,3 @@ void uv__fs_event_destroy(uv_fs_event_t* handle) {
127125
close(handle->fd);
128126
handle->fd = -1;
129127
}
130-
131-
#else /* !HAVE_KQUEUE */
132-
133-
int uv_fs_event_init(uv_loop_t* loop,
134-
uv_fs_event_t* handle,
135-
const char* filename,
136-
uv_fs_event_cb cb,
137-
int flags) {
138-
loop->counters.fs_event_init++;
139-
uv__set_sys_error(loop, ENOSYS);
140-
return -1;
141-
}
142-
143-
144-
void uv__fs_event_destroy(uv_fs_event_t* handle) {
145-
UNREACHABLE();
146-
}
147-
148-
149-
/* Called by libev, don't touch. */
150-
void uv__kqueue_hack(EV_P_ int fflags, ev_io *w) {
151-
UNREACHABLE();
152-
}
153-
154-
#endif /* HAVE_KQUEUE */

0 commit comments

Comments
 (0)