diff options
Diffstat (limited to 'src/H5FDlog.c')
-rw-r--r-- | src/H5FDlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5FDlog.c b/src/H5FDlog.c index df07c0a..dee4581 100644 --- a/src/H5FDlog.c +++ b/src/H5FDlog.c @@ -628,7 +628,7 @@ H5FD_log_close(H5FD_t *_file) if(file->fa.flags&H5FD_LOG_TIME_CLOSE) HDgettimeofday(&timeval_start,NULL); #endif /* H5_HAVE_GETTIMEOFDAY */ - if (close(file->fd)<0) + if (HDclose(file->fd)<0) HGOTO_ERROR(H5E_IO, H5E_CANTCLOSEFILE, FAIL, "unable to close file") #ifdef H5_HAVE_GETTIMEOFDAY if(file->fa.flags&H5FD_LOG_TIME_CLOSE) @@ -1331,7 +1331,7 @@ H5FD_log_flush(H5FD_t *_file, hid_t UNUSED dxpl_id, unsigned UNUSED closing) if(file->eoa>file->eof) { if(-1 == file_seek(file->fd, (file_offset_t)(file->eoa - 1), SEEK_SET)) HGOTO_ERROR(H5E_IO, H5E_SEEKERROR, FAIL, "unable to seek to proper position") - if(write(file->fd, "", (size_t)1) != 1) + if(HDwrite(file->fd, "", (size_t)1) != 1) HGOTO_ERROR(H5E_IO, H5E_WRITEERROR, FAIL, "file write failed") file->eof = file->eoa; file->pos = file->eoa; |