summaryrefslogtreecommitdiffstats
path: root/patches/qt-everywhere-opensource-src-5.15.3/0008-qtbase-include-limits-where-necessary.patch
blob: ff9732d622a42eab617e7e1f4bda3beb3233570d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Lucas Stach <l.stach@pengutronix.de>
Date: Sat, 1 May 2021 00:57:24 +0200
Subject: [PATCH] qtbase: include limits where necessary

Upstream fixes:
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=813a928c7c3cf986
https://code.qt.io/cgit/qt/qtbase.git/commit/?id=2b2b3155d9f6ba1e

Fixes build with GCC11, which changed internal includes so that
limits isn't implicitly pulled in some cases.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
---
 qtbase/src/corelib/text/qbytearraymatcher.h     | 2 ++
 qtbase/src/corelib/tools/qoffsetstringarray_p.h | 1 +
 2 files changed, 3 insertions(+)

diff --git a/qtbase/src/corelib/text/qbytearraymatcher.h b/qtbase/src/corelib/text/qbytearraymatcher.h
index 0eedfc1d2035..f5f9bef7b87c 100644
--- a/qtbase/src/corelib/text/qbytearraymatcher.h
+++ b/qtbase/src/corelib/text/qbytearraymatcher.h
@@ -42,6 +42,8 @@
 
 #include <QtCore/qbytearray.h>
 
+#include <limits>
+
 QT_BEGIN_NAMESPACE
 
 
diff --git a/qtbase/src/corelib/tools/qoffsetstringarray_p.h b/qtbase/src/corelib/tools/qoffsetstringarray_p.h
index 4dd9e9603bc1..e26a57ff4320 100644
--- a/qtbase/src/corelib/tools/qoffsetstringarray_p.h
+++ b/qtbase/src/corelib/tools/qoffsetstringarray_p.h
@@ -55,6 +55,7 @@
 
 #include <tuple>
 #include <array>
+#include <limits>
 
 QT_BEGIN_NAMESPACE