diff --git a/java/src/jni/h5pDCPLImp.c b/java/src/jni/h5pDCPLImp.c index bd44f447bd1..a624fd96987 100644 --- a/java/src/jni/h5pDCPLImp.c +++ b/java/src/jni/h5pDCPLImp.c @@ -1067,7 +1067,7 @@ Java_hdf_hdf5lib_H5_H5Pset_1external(JNIEnv *env, jclass clss, jlong plist, jstr PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Pset_external: file name not pinned"); - if ((status = H5Pset_external((hid_t)plist, fileName, (off_t)offset, (hsize_t)size)) < 0) + if ((status = H5Pset_external((hid_t)plist, fileName, (HDoff_t)offset, (hsize_t)size)) < 0) H5_LIBRARY_ERROR(ENVONLY); done: @@ -1089,7 +1089,7 @@ Java_hdf_hdf5lib_H5_H5Pget_1external(JNIEnv *env, jclass clss, jlong plist, jint jboolean isCopy; jstring str; hsize_t s; - off_t o; + HDoff_t o; jsize arrLen; jlong *theArray = NULL; char *file = NULL; @@ -1111,8 +1111,8 @@ Java_hdf_hdf5lib_H5_H5Pget_1external(JNIEnv *env, jclass clss, jlong plist, jint if (NULL == (file = (char *)malloc(sizeof(char) * (size_t)name_size))) H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_external: memory allocation failed"); - if ((status = H5Pget_external((hid_t)plist, (unsigned)idx, (size_t)name_size, file, (off_t *)&o, - (hsize_t *)&s)) < 0) + if ((status = H5Pget_external((hid_t)plist, (unsigned)idx, (size_t)name_size, file, &o, (hsize_t *)&s)) < + 0) H5_LIBRARY_ERROR(ENVONLY); if (NULL != size) {