From f91c76f9c59dfa50514e63f8ad1c8857f65cadee Mon Sep 17 00:00:00 2001 From: Pierre d'Herbemont Date: Thu, 17 Dec 2009 20:44:24 +0100 Subject: [PATCH] config: Use fsync on Snow Leopard. fdatasync is not exported. Fallback on fsync. --- src/config/file.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/config/file.c b/src/config/file.c index 60c2cf05a8..db1128dc26 100644 --- a/src/config/file.c +++ b/src/config/file.c @@ -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); -- 2.39.2