diff --git a/src/Solvers/petsc_solver.hpp b/src/Solvers/petsc_solver.hpp
index 6bb051f3d0813c17ba02fdf6b0ad8f675dfaf36e..9e5f762dd1df48907a5a1021716f8c5333332996 100644
--- a/src/Solvers/petsc_solver.hpp
+++ b/src/Solvers/petsc_solver.hpp
@@ -1462,7 +1462,8 @@ public:
      */
     Vector<double,PETSC_BASE> with_nullspace_solve(SparseMatrix<double,int,PETSC_BASE> & A, const Vector<double,PETSC_BASE> & b, bool initial_guess = false,bool symmetric = false)
     {
-        Mat & A_ = A.getMat();
+#ifndef __arm64__
+	Mat & A_ = A.getMat();
         const Vec & b_ = b.getVec();
 
         // We set the size of x according to the Matrix A
@@ -1523,6 +1524,7 @@ public:
         x.update();
 
         return x;
+#endif
     }
 
 	/*! \brief Return the KSP solver