Sfoglia il codice sorgente

lfs_filebd_sync: fix compilation on Windows

Mikhail Paulyshka 3 anni fa
parent
commit
a405c3293f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      bd/lfs_filebd.c

+ 1 - 1
bd/lfs_filebd.c

@@ -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