diff --git a/third_party/ijar/mapped_file_unix.cc b/third_party/ijar/mapped_file_unix.cc
index 6e3a908718..030e9ca59f 100644
--- a/third_party/ijar/mapped_file_unix.cc
+++ b/third_party/ijar/mapped_file_unix.cc
@@ -19,6 +19,7 @@
 #include <sys/mman.h>
 
 #include <algorithm>
+#include <limits>
 
 #include "third_party/ijar/mapped_file.h"
 
diff --git a/third_party/ijar/zlib_client.h b/third_party/ijar/zlib_client.h
index ed6616362f..da0848852b 100644
--- a/third_party/ijar/zlib_client.h
+++ b/third_party/ijar/zlib_client.h
@@ -19,6 +19,8 @@
 
 #include "third_party/ijar/common.h"
 
+#include <limits>
+
 namespace devtools_ijar {
 // Try to compress a file entry in memory using the deflate algorithm.
 // It will compress buf (of size length) unless the compressed size is bigger
