File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1024,16 +1024,16 @@ bool FileCommit(FILE *file)
10241024 LogPrintf (" %s: FlushFileBuffers failed: %d\n " , __func__, GetLastError ());
10251025 return false ;
10261026 }
1027- #elif HAVE_FDATASYNC
1028- if (fdatasync (fileno (file)) != 0 && errno != EINVAL) { // Ignore EINVAL for filesystems that don't support sync
1029- LogPrintf (" %s: fdatasync failed: %d\n " , __func__, errno);
1030- return false ;
1031- }
10321027#elif defined(MAC_OSX) && defined(F_FULLFSYNC)
10331028 if (fcntl (fileno (file), F_FULLFSYNC, 0 ) == -1 ) { // Manpage says "value other than -1" is returned on success
10341029 LogPrintf (" %s: fcntl F_FULLFSYNC failed: %d\n " , __func__, errno);
10351030 return false ;
10361031 }
1032+ #elif HAVE_FDATASYNC
1033+ if (fdatasync (fileno (file)) != 0 && errno != EINVAL) { // Ignore EINVAL for filesystems that don't support sync
1034+ LogPrintf (" %s: fdatasync failed: %d\n " , __func__, errno);
1035+ return false ;
1036+ }
10371037#else
10381038 if (fsync (fileno (file)) != 0 && errno != EINVAL) {
10391039 LogPrintf (" %s: fsync failed: %d\n " , __func__, errno);
You can’t perform that action at this time.
0 commit comments