Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: freebsd doesn't have fdatasync, do a full fsync instead
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Aug 17, 2011
1 parent 78f4aca commit c455f37
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/unix/fs.c
Expand Up @@ -447,7 +447,12 @@ int uv_fs_fsync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {

int uv_fs_fdatasync(uv_loop_t* loop, uv_fs_t* req, uv_file file, uv_fs_cb cb) {
char* path = NULL;
#ifdef __FreeBSD__
/* freebsd doesn't have fdatasync, do a full fsync instead. */
WRAP_EIO(UV_FS_FDATASYNC, eio_fdatasync, fsync, ARGS1(file))
#else
WRAP_EIO(UV_FS_FDATASYNC, eio_fdatasync, fdatasync, ARGS1(file))
#endif
}


Expand Down

0 comments on commit c455f37

Please sign in to comment.