diff --git a/api/omdocument.cc b/api/omdocument.cc
index e8ef1b9..327b1c4 100644
--- a/api/omdocument.cc
+++ b/api/omdocument.cc
@@ -39,6 +39,7 @@
 
 #include <algorithm>
 #include <string>
+#include <limits>
 
 using namespace std;
 
