Merge pull request #715 from Mixaill/patch-1
lfs_filebd_sync: fix compilation on Windows
This commit is contained in:
+1
-1
@@ -204,7 +204,7 @@ int lfs_filebd_sync(const struct lfs_config *cfg) {
|
||||
// file sync
|
||||
lfs_filebd_t *bd = cfg->context;
|
||||
#ifdef _WIN32
|
||||
int err = FlushFileBuffers((HANDLE) _get_osfhandle(fd)) ? 0 : -1;
|
||||
int err = FlushFileBuffers((HANDLE) _get_osfhandle(bd->fd)) ? 0 : -1;
|
||||
#else
|
||||
int err = fsync(bd->fd);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user