File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -1024,23 +1024,21 @@ bool FileCommit(FILE *file)
1024
1024
LogPrintf (" %s: FlushFileBuffers failed: %d\n " , __func__, GetLastError ());
1025
1025
return false ;
1026
1026
}
1027
- #else
1028
- #if HAVE_FDATASYNC
1027
+ #elif HAVE_FDATASYNC
1029
1028
if (fdatasync (fileno (file)) != 0 && errno != EINVAL) { // Ignore EINVAL for filesystems that don't support sync
1030
1029
LogPrintf (" %s: fdatasync failed: %d\n " , __func__, errno);
1031
1030
return false ;
1032
1031
}
1033
- #elif defined(MAC_OSX) && defined(F_FULLFSYNC)
1032
+ #elif defined(MAC_OSX) && defined(F_FULLFSYNC)
1034
1033
if (fcntl (fileno (file), F_FULLFSYNC, 0 ) == -1 ) { // Manpage says "value other than -1" is returned on success
1035
1034
LogPrintf (" %s: fcntl F_FULLFSYNC failed: %d\n " , __func__, errno);
1036
1035
return false ;
1037
1036
}
1038
- #else
1037
+ #else
1039
1038
if (fsync (fileno (file)) != 0 && errno != EINVAL) {
1040
1039
LogPrintf (" %s: fsync failed: %d\n " , __func__, errno);
1041
1040
return false ;
1042
1041
}
1043
- #endif
1044
1042
#endif
1045
1043
return true ;
1046
1044
}
You can’t perform that action at this time.
0 commit comments