on master help sign in
add MacOS X fsync-equivalent support
commitc5463d2749a248c56a5228b04ae9a647cb5999d5 authorAgentM <agentm@themactionfaction.com> dateSun 10 Jul 2016, 20:42 (10 years ago) parent6ed2700
1 file changed+5−1
ProjectM36/DirectoryFsync.c+5−1
ProjectM36/DirectoryFsync.c+5−1
@@ -33,12 +33,16 @@ int cDirectoryFsync(char *path)
3333 }
3434
3535 /* execute the fsync */
36+
37+#if defined(__APPLE__) && defined(__MACH__) && defined(F_FULLFSYNC)
38+ ret = fcntl(fd, F_FULLFSYNC);
39+#else
3640 ret = fsync(fd);
41+#endif
3742 if(ret < 0)
3843 {
3944 return errno;
4045 }
41−
4246 return 0;
4347}
4448#endif