From c4279a68b005471653c2228d4054ccdf346c6baa Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Fri, 8 Jan 2021 11:15:10 -0600 Subject: [PATCH] Allow for the HDF5 file format to be compatible with features greater than HDF5 1.8, which may require to have a superblock greater than v2. Ref: Update HDF5 format compatibility #951 --- libhdf5/hdf5create.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libhdf5/hdf5create.c b/libhdf5/hdf5create.c index 27a99405c9..73bfda70bf 100644 --- a/libhdf5/hdf5create.c +++ b/libhdf5/hdf5create.c @@ -168,12 +168,11 @@ nc4_create_file(const char *path, int cmode, size_t initialsz, #ifdef HAVE_H5PSET_LIBVER_BOUNDS #if H5_VERSION_GE(1,10,2) - if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_EARLIEST, H5F_LIBVER_V18) < 0) + if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0) #else - if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_EARLIEST, - H5F_LIBVER_LATEST) < 0) + if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST) < 0) #endif - BAIL(NC_EHDFERR); + BAIL(NC_EHDFERR); #endif /* Create the property list. */