summaryrefslogtreecommitdiffstats
path: root/src/H5FDstdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5FDstdio.c')
-rw-r--r--src/H5FDstdio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index 8f4f7f0..64919ed 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -414,7 +414,11 @@ H5FD_stdio_open( const char *name, unsigned flags, hid_t fapl_id,
}
/* Get the file descriptor (needed for truncate and some Windows information) */
+#ifdef H5_HAVE_WIN32_API
+ file->fd = _fileno(file->fp);
+#else /* H5_HAVE_WIN32_API */
file->fd = fileno(file->fp);
+#endif /* H5_HAVE_WIN32_API */
if(file->fd < 0) {
free(file);
fclose(f);