freebsd, openbsd: don't use fdatasync()
The fdatasync() system call does not exist on either FreeBSD or OpenBSD, fall back to fsync().
This commit is contained in:
parent
7aa1261769
commit
7833df14ba
@ -98,10 +98,12 @@
|
||||
|
||||
|
||||
static ssize_t uv__fs_fdatasync(uv_fs_t* req) {
|
||||
#if defined(__APPLE__) && defined(F_FULLFSYNC)
|
||||
#if defined(__linux__) || defined(__sun) || defined(__NetBSD__)
|
||||
return fdatasync(req->file);
|
||||
#elif defined(__APPLE__) && defined(F_FULLFSYNC)
|
||||
return fcntl(req->file, F_FULLFSYNC);
|
||||
#else
|
||||
return fdatasync(req->file);
|
||||
return fsync(req->file);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user