Bugfix: Define and use HAVE_FDATASYNC correctly outside LevelDB

This commit is contained in:
Luke Dashjr
2020-08-20 17:41:54 +00:00
parent e9b3012654
commit c4b85ba704
2 changed files with 2 additions and 2 deletions

View File

@@ -1025,7 +1025,7 @@ bool FileCommit(FILE *file)
return false;
}
#else
#if defined(HAVE_FDATASYNC)
#if HAVE_FDATASYNC
if (fdatasync(fileno(file)) != 0 && errno != EINVAL) { // Ignore EINVAL for filesystems that don't support sync
LogPrintf("%s: fdatasync failed: %d\n", __func__, errno);
return false;