VFS: Fix Windows build

This commit is contained in:
Jeffrey Pfau 2015-07-07 01:03:36 -07:00
parent 4b3df31e49
commit f0c8c246cc
1 changed files with 4 additions and 0 deletions

View File

@ -173,5 +173,9 @@ static bool _vfdSync(struct VFile* vf, const void* buffer, size_t size) {
UNUSED(buffer); UNUSED(buffer);
UNUSED(size); UNUSED(size);
struct VFileFD* vfd = (struct VFileFD*) vf; struct VFileFD* vfd = (struct VFileFD*) vf;
#ifndef _WIN32
return fsync(vfd->fd) == 0; return fsync(vfd->fd) == 0;
#else
return FlushFileBuffers((HANDLE) _get_osfhandle(vfd->fd));
#endif
} }