summaryrefslogtreecommitdiff
path: root/deps/uv/src/unix/fs.c
diff options
context:
space:
mode:
authorSaúl Ibarra Corretgé <saghul@gmail.com>2016-04-01 11:19:19 +0200
committerSaúl Ibarra Corretgé <saghul@gmail.com>2016-04-07 10:48:27 -0300
commitc3cec1eefc9f3b55a3fb7bd623b3d921f493870d (patch)
tree8a4defa8165e15d3d2afd331f2b04c90c70d5bb6 /deps/uv/src/unix/fs.c
parent71544c5ecae20123a328e08a04b7f1587c4cdbbd (diff)
downloadandroid-node-v8-c3cec1eefc9f3b55a3fb7bd623b3d921f493870d.tar.gz
android-node-v8-c3cec1eefc9f3b55a3fb7bd623b3d921f493870d.tar.bz2
android-node-v8-c3cec1eefc9f3b55a3fb7bd623b3d921f493870d.zip
deps: upgrade libuv to 1.9.0
Fixes: https://github.com/nodejs/node/issues/5737 Fixes: https://github.com/nodejs/node/issues/4643 Fixes: https://github.com/nodejs/node/issues/4291 Fixes: https://github.com/nodejs/node-v0.x-archive/issues/8960 Refs: https://github.com/nodejs/node/pull/3594 PR-URL: https://github.com/nodejs/node/pull/5994 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Diffstat (limited to 'deps/uv/src/unix/fs.c')
-rw-r--r--deps/uv/src/unix/fs.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c
index 57b65be25a..8936ad9d83 100644
--- a/deps/uv/src/unix/fs.c
+++ b/deps/uv/src/unix/fs.c
@@ -127,8 +127,8 @@
static ssize_t uv__fs_fdatasync(uv_fs_t* req) {
#if defined(__linux__) || defined(__sun) || defined(__NetBSD__)
return fdatasync(req->file);
-#elif defined(__APPLE__) && defined(F_FULLFSYNC)
- return fcntl(req->file, F_FULLFSYNC);
+#elif defined(__APPLE__) && defined(SYS_fdatasync)
+ return syscall(SYS_fdatasync, req->file);
#else
return fsync(req->file);
#endif
@@ -749,13 +749,13 @@ static void uv__to_stat(struct stat* src, uv_stat_t* dst) {
dst->st_gen = src->st_gen;
#elif defined(__ANDROID__)
dst->st_atim.tv_sec = src->st_atime;
- dst->st_atim.tv_nsec = src->st_atime_nsec;
+ dst->st_atim.tv_nsec = src->st_atimensec;
dst->st_mtim.tv_sec = src->st_mtime;
- dst->st_mtim.tv_nsec = src->st_mtime_nsec;
+ dst->st_mtim.tv_nsec = src->st_mtimensec;
dst->st_ctim.tv_sec = src->st_ctime;
- dst->st_ctim.tv_nsec = src->st_ctime_nsec;
+ dst->st_ctim.tv_nsec = src->st_ctimensec;
dst->st_birthtim.tv_sec = src->st_ctime;
- dst->st_birthtim.tv_nsec = src->st_ctime_nsec;
+ dst->st_birthtim.tv_nsec = src->st_ctimensec;
dst->st_flags = 0;
dst->st_gen = 0;
#elif !defined(_AIX) && ( \
@@ -858,9 +858,14 @@ static ssize_t uv__fs_buf_iter(uv_fs_t* req, uv__fs_buf_iter_processor process)
total += result;
}
+ if (errno == EINTR && total == -1)
+ return total;
+
if (bufs != req->bufsml)
uv__free(bufs);
+
req->bufs = NULL;
+ req->nbufs = 0;
return total;
}