Loading

Paste #pd1rbtqzf

  1. Index: src/ini.cpp
  2. ===================================================================
  3. --- src/ini.cpp (revision 27386)
  4. +++ src/ini.cpp (working copy)
  5. @@ -16,7 +16,6 @@
  6.  #include "fileio_func.h"
  7.  
  8.  #if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L) || (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 500)
  9. -# define WITH_FDATASYNC
  10.  # include <unistd.h>
  11.  #endif
  12.  
  13. @@ -80,7 +79,7 @@
  14.   * APIs to do so. We only need to flush the data as the metadata itself
  15.   * (modification date etc.) is not important to us; only the real data is.
  16.   */
  17. -#ifdef WITH_FDATASYNC
  18. +#if defined(_POSIX_SYNCHRONIZED_IO) && _POSIX_SYNCHRONIZED_IO > 0
  19.     int ret = fdatasync(fileno(f));
  20.     fclose(f);
  21.     if (ret != 0) return false;
  22.  

Comments