darwin: replace F_FULLFSYNC with fdatasync syscall

Refs: https://github.com/nodejs/node/pull/5402
PR-URL: https://github.com/libuv/libuv/pull/732
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This commit is contained in:
Saúl Ibarra Corretgé 2016-02-24 12:35:13 +01:00
parent 12548de1b5
commit a4213b7699

View File

@ -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