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)
1024
1024
LogPrintf (" %s: FlushFileBuffers failed: %d\n " , __func__, GetLastError ());
1025
1025
return false ;
1026
1026
}
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
- }
1032
1027
#elif defined(MAC_OSX) && defined(F_FULLFSYNC)
1033
1028
if (fcntl (fileno (file), F_FULLFSYNC, 0 ) == -1 ) { // Manpage says "value other than -1" is returned on success
1034
1029
LogPrintf (" %s: fcntl F_FULLFSYNC failed: %d\n " , __func__, errno);
1035
1030
return false ;
1036
1031
}
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
+ }
1037
1037
#else
1038
1038
if (fsync (fileno (file)) != 0 && errno != EINVAL) {
1039
1039
LogPrintf (" %s: fsync failed: %d\n " , __func__, errno);
You can’t perform that action at this time.
0 commit comments