VFS: Fix Windows build
Jeffrey Pfau jeffrey@endrift.com
Tue, 07 Jul 2015 01:03:36 -0700
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
src/util/vfs/vfs-fd.c
→
src/util/vfs/vfs-fd.c
@@ -173,5 +173,9 @@ static bool _vfdSync(struct VFile* vf, const void* buffer, size_t size) {
UNUSED(buffer); UNUSED(size); struct VFileFD* vfd = (struct VFileFD*) vf; +#ifndef _WIN32 return fsync(vfd->fd) == 0; +#else + return FlushFileBuffers((HANDLE) _get_osfhandle(vfd->fd)); +#endif }