--- ../cpl_port.h
+++ ./port/cpl_port.h
@@ -140,7 +140,7 @@
 #include <stdarg.h>
 #include <string.h>
 #include <ctype.h>
-#include <limits.h>
+#include <linux/limits.h>
 
 #include <time.h>
 
@@ -1085,7 +1085,7 @@ inline bool operator!= (const bool& one, const MSVCPedanticBool& other) { return
 #include <set>
 #include <string>
 #include <cstddef>
-#include <limits>
+#include <linux/limits>
 #include <sstream>
 #include <fstream>
 #include <algorithm>
