Commit 1b6f89b4 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Utils: Make sure we only use fdatasync() on systems that have it.



Change-Id: I7260c05081942acd5ecd7c66e864d4efc5041add
Reviewed-by: default avatarOswald Buddenhagen <oswald.buddenhagen@digia.com>
parent 2c619451
......@@ -102,10 +102,10 @@ bool SaveFile::commit()
}
#ifdef Q_OS_WIN
FlushFileBuffers(reinterpret_cast<HANDLE>(handle()));
#elif defined(Q_OS_MAC)
fsync(handle());
#else
#elif _POSIX_SYNCHRONIZED_IO > 0
fdatasync(handle());
#else
fsync(handle());
#endif
close();
if (error() != NoError) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment