From e157ea7bdb39bbd64354fd4ebfeccbd462443766 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Mon, 1 Apr 2024 15:26:10 -0600 Subject: [PATCH] Protect use of function only in later netCDF versions The `nc_def_var_fill` function only exists in netCDF-4.6: or in earlier versions with `NC_HAS_HDF5` defined. --- packages/seacas/libraries/exodus/src/ex_put_concat_elem_block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/seacas/libraries/exodus/src/ex_put_concat_elem_block.c b/packages/seacas/libraries/exodus/src/ex_put_concat_elem_block.c index 0d839323d52b..c9f4d1022a0f 100644 --- a/packages/seacas/libraries/exodus/src/ex_put_concat_elem_block.c +++ b/packages/seacas/libraries/exodus/src/ex_put_concat_elem_block.c @@ -271,8 +271,10 @@ int ex_put_concat_elem_block(int exoid, const void_int *elem_blk_id, char *const ex_err_fn(exoid, __func__, errmsg, status); goto error_ret; /* exit define mode and return */ } +#if defined(EX_CAN_USE_NC_DEF_VAR_FILL) int fill = NC_FILL_CHAR; nc_def_var_fill(exoid, temp, 0, &fill); +#endif eb_array[iblk] = temp; dims[0] = numelbdim;