Skip to content

Commit

Permalink
fs, bugfix:compile error on FreeBSD.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Nov 2, 2017
1 parent 5c42bd4 commit 98e4d2e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fibjs/src/fs/fs_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down

0 comments on commit 98e4d2e

Please sign in to comment.