diff --git a/src/data/dem.cpp b/src/data/dem.cpp
index 47f097f..b4df2da 100644
--- a/src/data/dem.cpp
+++ b/src/data/dem.cpp
@@ -1,4 +1,4 @@
-/*
+/*
WARNING: This code uses internal Qt API - the QZipReader class for reading
ZIP files - and things may break if Qt changes the API. For Qt5 this is not
a problem as we can "see the future" now and there are no changes in all
@@ -11,6 +11,7 @@
effort The Qt Company is willing to make about anything desktop related...
*/
+#include <limits>
#include <QtEndian>
#include <QtMath>
#include <QDir>
diff --git a/src/data/fitparser.cpp b/src/data/fitparser.cpp
index d8b252a..fea129f 100644
--- a/src/data/fitparser.cpp
+++ b/src/data/fitparser.cpp
@@ -1,3 +1,4 @@
+#include <limits>
#include <QtEndian>
#include "fitparser.h"
diff --git a/src/map/IMG/imgdata.cpp b/src/map/IMG/imgdata.cpp
index 2b27db3..348b0d2 100644
--- a/src/map/IMG/imgdata.cpp
+++ b/src/map/IMG/imgdata.cpp
@@ -1,3 +1,4 @@
+#include <limits>
#include <QMap>
#include <QtEndian>
#include <QFile>
diff --git a/src/map/jnxmap.cpp b/src/map/jnxmap.cpp
index ddab2b4..58fa505 100644
--- a/src/map/jnxmap.cpp
+++ b/src/map/jnxmap.cpp
@@ -1,3 +1,4 @@
+#include <limits>
#include <QtEndian>
#include <QPainter>
#include <QFileInfo>
diff --git a/src/map/ozf.cpp b/src/map/ozf.cpp
index 7ff7499..6515533 100644
--- a/src/map/ozf.cpp
+++ b/src/map/ozf.cpp
@@ -1,4 +1,5 @@
#include <cstring>
+#include <limits>
#include <QtEndian>
#include <QFile>
#include "common/color.h"