diff --git a/3rd-party/romio341/adio/common/ad_darray.c b/3rd-party/romio341/adio/common/ad_darray.c
index 2c50ad9d871fb43cefd1296de1a6527cace6f74a..6e0fc574d51926ef4fbdc8b0f0203625f4e44f5d 100644
--- a/3rd-party/romio341/adio/common/ad_darray.c
+++ b/3rd-party/romio341/adio/common/ad_darray.c
@@ -196,8 +196,8 @@ static int MPIOI_Type_block(int *array_of_gsizes, int dim, int ndims, int nprocs
     if (mysize == 0)
         *st_offset = 0;
 
-    MPI_Aint ex;
-    MPI_Type_extent(type_old, &ex);
+    MPI_Aint lb, ex;
+    MPI_Type_get_extent(type_old, &lb, &ex);
     MPI_Datatype type_tmp;
     MPI_Type_create_resized(*type_new, 0, array_of_gsizes[dim] * ex, &type_tmp);
     MPI_Type_free(type_new);
@@ -300,8 +300,8 @@ static int MPIOI_Type_cyclic(int *array_of_gsizes, int dim, int ndims, int nproc
     if (local_size == 0)
         *st_offset = 0;
 
-    MPI_Aint ex;
-    MPI_Type_extent(type_old, &ex);
+    MPI_Aint lb, ex;
+    MPI_Type_get_extent(type_old, &lb, &ex);
     MPI_Type_create_resized(*type_new, 0, array_of_gsizes[dim] * ex, &type_tmp);
     MPI_Type_free(type_new);
     *type_new = type_tmp;