Merge remote-tracking branch 'origin/master' into test-and-bench-runners

This commit is contained in:
Christopher Haster
2022-12-06 23:08:53 -06:00
7 changed files with 34 additions and 18 deletions

View File

@@ -147,7 +147,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