Skip to content

Commit

Permalink
lfs_filebd_sync: fix compilation on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
Mixaill authored Jul 27, 2022
1 parent 40dba4a commit a405c32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bd/lfs_filebd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a405c32

Please sign in to comment.