Skip to content

Commit

Permalink
Protect use of function only in later netCDF versions
Browse files Browse the repository at this point in the history
The `nc_def_var_fill` function only exists in netCDF-4.6: or in earlier versions with `NC_HAS_HDF5` defined.
  • Loading branch information
gsjaardema authored Apr 1, 2024
1 parent 88b2d6f commit e157ea7
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit e157ea7

Please sign in to comment.