aboutsummaryrefslogtreecommitdiff
path: root/src/RecoverVar.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/RecoverVar.c')
-rw-r--r--src/RecoverVar.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/RecoverVar.c b/src/RecoverVar.c
index 90072a2..2097fdf 100644
--- a/src/RecoverVar.c
+++ b/src/RecoverVar.c
@@ -610,7 +610,12 @@ static int IOHDF5Util_RestoreGA (hid_t dataset, int vindex, int timelevel,
hid_t filespace, memspace, chunk;
pGExtras *extras;
char chunkname[32];
+#if (H5_VERS_MAJOR == 1 && \
+ (H5_VERS_MINOR < 6 || (H5_VERS_MINOR == 6 && H5_VERS_RELEASE < 4)))
hssize_t *chunk_origin;
+#else
+ hsize_t *chunk_origin;
+#endif
hsize_t *chunk_dims;
#endif
@@ -634,8 +639,8 @@ static int IOHDF5Util_RestoreGA (hid_t dataset, int vindex, int timelevel,
/* get the dimension of the variable */
dim = CCTK_GroupDimFromVarI (vindex);
- chunk_origin = malloc (dim * sizeof (hssize_t));
- chunk_dims = malloc (dim * sizeof (hsize_t));
+ chunk_origin = malloc (dim * sizeof (*chunk_origin));
+ chunk_dims = malloc (dim * sizeof (*chunk_dims));
/* allocate memory for the biggest chunk */
npoints = 1;