summaryrefslogtreecommitdiffstats
path: root/src/H5FDstdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDstdio.c')
-rw-r--r--src/H5FDstdio.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 5e7246a..f7510fe 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -875,9 +875,10 @@ H5FD_stdio_flush(H5FD_t *_file, hid_t dxpl_id, unsigned closing)
#ifdef WIN32
HFILE filehandle; /* Windows file handle */
LARGE_INTEGER li; /* 64-bit integer for SetFilePointer() call */
+ fd = _fileno(file->fp);
/* Map the posix file handle to a Windows file handle */
- filehandle = _get_osfhandle(file->fd);
+ filehandle = _get_osfhandle(fd);
/* Translate 64-bit integers into form Windows wants */
/* [This algorithm is from the Windows documentation for SetFilePointer()] */