diff --git a/config-unix.mk b/config-unix.mk index c8220c56..ac9f4d30 100644 --- a/config-unix.mk +++ b/config-unix.mk @@ -51,6 +51,7 @@ endif ifeq (Darwin,$(uname_S)) EV_CONFIG=config_darwin.h EIO_CONFIG=config_darwin.h +CPPFLAGS += -D__DARWIN_64_BIT_INO_T=1 CPPFLAGS += -Isrc/ares/config_darwin LINKFLAGS+=-framework CoreServices OBJS += src/unix/darwin.o diff --git a/src/unix/fs.c b/src/unix/fs.c index 57664c83..2ce38f14 100644 --- a/src/unix/fs.c +++ b/src/unix/fs.c @@ -518,11 +518,11 @@ static int _futime(const uv_file file, double atime, double mtime) { int uv_fs_futime(uv_loop_t* loop, uv_fs_t* req, uv_file file, double atime, double mtime, uv_fs_cb cb) { -#if HAVE_FUTIMES const char* path = NULL; uv_fs_req_init(loop, req, UV_FS_FUTIME, path, cb); +#if HAVE_FUTIMES WRAP_EIO(UV_FS_FUTIME, eio_futime, _futime, ARGS3(file, atime, mtime)) #else uv__set_sys_error(loop, ENOSYS); diff --git a/src/unix/stream.c b/src/unix/stream.c index 3cdeaa8c..25737814 100644 --- a/src/unix/stream.c +++ b/src/unix/stream.c @@ -145,7 +145,7 @@ void uv__stream_destroy(uv_stream_t* stream) { req = ngx_queue_data(q, uv_write_t, queue); if (req->cb) { - uv__set_artificial_error(stream->loop, req->error); + uv__set_sys_error(stream->loop, req->error); req->cb(req, req->error ? -1 : 0); } } @@ -490,7 +490,7 @@ static void uv__write_callbacks(uv_stream_t* stream) { /* NOTE: call callback AFTER freeing the request data. */ if (req->cb) { - uv__set_artificial_error(stream->loop, req->error); + uv__set_sys_error(stream->loop, req->error); req->cb(req, req->error ? -1 : 0); } diff --git a/uv.gyp b/uv.gyp index b5d77fcb..9c4cd46a 100644 --- a/uv.gyp +++ b/uv.gyp @@ -9,6 +9,9 @@ 'EIO_STACKSIZE=262144' ], 'conditions': [ + ['OS=="mac"', { + 'defines': ['__DARWIN_64_BIT_INO_T=1'], + }], ['OS=="solaris"', { 'cflags': ['-pthreads'], 'ldlags': ['-pthreads'],