From a4213b769999070f8fcce25dd32c1c111d31b652 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Wed, 24 Feb 2016 12:35:13 +0100 Subject: [PATCH] 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 --- src/unix/fs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unix/fs.c b/src/unix/fs.c index 27b6c5dc..54253303 100644 --- a/src/unix/fs.c +++ b/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