]> git.sesse.net Git - vlc/blobdiff - src/config/file.c
config: Use fsync on Snow Leopard.
[vlc] / src / config / file.c
index 60c2cf05a880adee008b6dc92f0f0e36896d2bdd..db1128dc266597eada44da777a956e3e3393ef18 100644 (file)
@@ -685,7 +685,11 @@ static int SaveConfigFile( vlc_object_t *p_this, const char *psz_module_name,
      */
     fflush (file); /* Flush from run-time */
 #ifndef WIN32
+#ifdef __APPLE__
+    fsync (fd); /* Flush from OS */
+#else
     fdatasync (fd); /* Flush from OS */
+#endif
     /* Atomically replace the file... */
     if (utf8_rename (temporary, permanent))
         utf8_unlink (temporary);