diff --git a/src/LinAlg/LinAlgInit.C b/src/LinAlg/LinAlgInit.C index f6195629d..e661c474d 100644 --- a/src/LinAlg/LinAlgInit.C +++ b/src/LinAlg/LinAlgInit.C @@ -36,7 +36,7 @@ LinAlgInit::LinAlgInit (int argc, char** argv) #if defined(HAS_SLEPC) SlepcInitialize(&argc,&argv,(char*)0,PETSC_NULL); #elif defined(HAS_PETSC) - PetscInitialize(&argc,&argv,(char*)0,PETSC_NULL); + PetscInitialize(&argc,&argv,(char*)0,PETSC_NULLPTR); #endif #ifdef HAVE_MPI #ifndef HAS_PETSC diff --git a/src/LinAlg/PETScSupport.h b/src/LinAlg/PETScSupport.h index 5ebabec00..bd52fb370 100644 --- a/src/LinAlg/PETScSupport.h +++ b/src/LinAlg/PETScSupport.h @@ -41,6 +41,10 @@ #include "slepceps.h" #endif +#ifndef PETSC_NULLPTR +#define PETSC_NULLPTR PETSC_NULL +#endif + #else typedef int PetscInt; //!< To avoid compilation failures typedef double PetscReal; //!< To avoid compilation failures