I don't know why, but the POSIX function fsync is commented out in the core.sys.posix.unistd module. Same for fdatasync(). Is there any reason for that?
It's an optional feature--declarations in POSIX headers are divided into labeled groups--and in the interest of time I've added them as needed. Once I check that these functions are available on Linux and OSX I'll see about adding declarations for them.
I think fsync() is pretty common in all posix OSs, and it's essential to do any crash-resistant I/O.
Fix is in r210.
http://www.dsource.org/projects/druntime/changeset/210 Thanks
Fixed dmd 2.038