From 611478850886e1f7d973661cd08830c4c24190af Mon Sep 17 00:00:00 2001 From: frosch Date: Thu, 20 Aug 2015 20:47:45 +0000 Subject: (svn r27389) -Fix: There are two different availability conditions for fdatasync in the manpage. Use them both, since at least on some MinGW versions one is not enough. --- src/ini.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ini.cpp b/src/ini.cpp index ccce19239..905ebfacf 100644 --- a/src/ini.cpp +++ b/src/ini.cpp @@ -16,7 +16,6 @@ #include "fileio_func.h" #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 500) -# define WITH_FDATASYNC # include #endif @@ -80,7 +79,7 @@ bool IniFile::SaveToDisk(const char *filename) * APIs to do so. We only need to flush the data as the metadata itself * (modification date etc.) is not important to us; only the real data is. */ -#ifdef WITH_FDATASYNC +#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0 int ret = fdatasync(fileno(f)); fclose(f); if (ret != 0) return false; -- cgit v1.2.3-54-g00ecf