diff --git a/MathLib/LinAlg/PETSc/PETScLinearSolver.cpp b/MathLib/LinAlg/PETSc/PETScLinearSolver.cpp
index 492bcf18ba5256dc836a0a3eec43b927b33a30e2..5b92490d64f3d30766453a05ce802c0a82047d07 100644
--- a/MathLib/LinAlg/PETSc/PETScLinearSolver.cpp
+++ b/MathLib/LinAlg/PETSc/PETScLinearSolver.cpp
@@ -95,7 +95,7 @@ bool PETScLinearSolver::solve(const PETScVector &b, PETScVector &x)
         PetscPrintf(PETSC_COMM_WORLD, "\nLinear solver (PETSc KSP) failed, quit now.\n");
         KSPDestroy(&_solver);
         PetscFinalize();
-        exit(EXIT_FAILURE);
+        std::exit(EXIT_FAILURE);
     }
 
 #ifdef TEST_MEM_PETSC