diff --git a/Geo/GeomMeshMatcher.cpp b/Geo/GeomMeshMatcher.cpp
index f8242ac7b49d97fba6b66b527452976c330fba2f..e77e44f3d09d895309822c30f21a63c3df015385 100644
--- a/Geo/GeomMeshMatcher.cpp
+++ b/Geo/GeomMeshMatcher.cpp
@@ -109,8 +109,8 @@ GeomMeshMatcher::matchVertices(GModel* m1, GModel *m2, bool& ok)
 
         // We match the vertices if their coordinates are the same under the
         // specified tolerance.
-	double score = fmax(fabs(v1->x() - v2->x()),
-                             fmax(fabs(v1->y() - v2->y()),
+				double score = std::max(fabs(v1->x() - v2->x()),
+                             std::max(fabs(v1->y() - v2->y()),
                                   fabs(v1->z() - v2->z())));
         if (score < tol && score < best_score) {
 	  best_candidate = v2;