aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/util/system.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util/system.cpp b/src/util/system.cpp
index 8164e884b1..e63f2e5c70 100644
--- a/src/util/system.cpp
+++ b/src/util/system.cpp
@@ -1021,7 +1021,7 @@ bool FileCommit(FILE *file)
return false;
}
#else
- #if defined(__linux__) || defined(__NetBSD__)
+ #if defined(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;