Permalink
Browse files

fs, bugfix:compile error on FreeBSD.

  • Loading branch information...
xicilion committed Nov 2, 2017
1 parent 5c42bd4 commit 98e4d2e06cc7ccbec9f7357b08ea0c06ab523acd
Showing with 5 additions and 0 deletions.
  1. +5 −0 fibjs/src/fs/fs_posix.cpp
@@ -215,8 +215,13 @@ result_t fs_base::fdatasync(int32_t fd, AsyncEvent* ac)
return CHECK_ERROR(CALL_E_NOSYNC);
#if defined(Darwin) || defined(FreeBSD)
#ifdef F_FULLFSYNC
if (::fcntl(fd, F_FULLFSYNC))
return CHECK_ERROR(LastError());
#else
if (::fsync(fd))
return CHECK_ERROR(LastError());
#endif
#else
if (::fdatasync(fd))
return CHECK_ERROR(LastError());

0 comments on commit 98e4d2e

Please sign in to comment.