diff --git a/include/numerics/petsc_solver_exception.h b/include/numerics/petsc_solver_exception.h index 09f07d4d4c..9f2033a27c 100644 --- a/include/numerics/petsc_solver_exception.h +++ b/include/numerics/petsc_solver_exception.h @@ -54,7 +54,11 @@ class PetscSolverException : public SolverException SolverException(error_code_in) { const char * text; +#if PETSC_VERSION_LESS_THAN(3,25,0) char * specific; +#else + const char * specific; +#endif auto ierr = PetscErrorMessage(cast_int(error_code), &text, &specific); // This is one scenario where we ignore the error code // returned by a PETSc function :)