diff --git a/Geo/MElement.cpp b/Geo/MElement.cpp
index 49f377c3c4b495a0b97d1abdd568dd1c0bdfc245..dd28bb8c79abe3d928b46dbff7a483c64b86c672 100644
--- a/Geo/MElement.cpp
+++ b/Geo/MElement.cpp
@@ -5,6 +5,7 @@
 
 #include <stdlib.h>
 #include <math.h>
+#include <limits>
 #include "GmshConfig.h"
 #include "GmshMessage.h"
 #include "GModel.h"