Skip to content

Commit 80cfad6

Browse files
committed
darwin: replace F_FULLFSYNC with fdatasync syscall
Refs: nodejs/node#5402
1 parent 12548de commit 80cfad6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/unix/fs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@
127127
static ssize_t uv__fs_fdatasync(uv_fs_t* req) {
128128
#if defined(__linux__) || defined(__sun) || defined(__NetBSD__)
129129
return fdatasync(req->file);
130-
#elif defined(__APPLE__) && defined(F_FULLFSYNC)
131-
return fcntl(req->file, F_FULLFSYNC);
130+
#elif defined(__APPLE__) && defined(SYS_fdatasync)
131+
return syscall(SYS_fdatasync, req->file);
132132
#else
133133
return fsync(req->file);
134134
#endif

0 commit comments

Comments
 (0)