aboutsummaryrefslogtreecommitdiff
path: root/depends/patches/qt/fix_limits_header.patch
blob: cb5a8cd1b5a62098303aebccb67e006da2dbc0fd (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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Fix compiling with GCC 11

See: https://bugreports.qt.io/browse/QTBUG-90395.

Upstream commits:
 - Qt 5.15 -- unavailable as open source
 - Qt 6.0: b2af6332ea37e45ab230a7a5d2d278f86d961b83
 - Qt 6.1: 9c56d4da2ff631a8c1c30475bd792f6c86bda53c

--- old/qtbase/src/corelib/global/qendian.h
+++ new/qtbase/src/corelib/global/qendian.h
@@ -44,6 +44,8 @@
 #include <QtCore/qfloat16.h>
 #include <QtCore/qglobal.h>
 
+#include <limits>
+
 // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
 #include <stdlib.h>
 #include <string.h>

--- old/qtbase/src/corelib/global/qfloat16.h
+++ new/qtbase/src/corelib/global/qfloat16.h
@@ -43,6 +43,7 @@
 
 #include <QtCore/qglobal.h>
 #include <QtCore/qmetatype.h>
+#include <limits>
 #include <string.h>
 
 #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)

--- old/qtbase/src/tools/moc/generator.cpp
+++ new/qtbase/src/tools/moc/generator.cpp
@@ -40,6 +40,8 @@
 #include <QtCore/qplugin.h>
 #include <QtCore/qstringview.h>
 
+#include <limits>
+
 #include <math.h>
 #include <stdio.h>
 
--- old/qtbase/src/corelib/text/qbytearraymatcher.h
+++ new/qtbase/src/corelib/text/qbytearraymatcher.h
@@ -42,6 +42,8 @@
 
 #include <QtCore/qbytearray.h>
 
+#include <limits>
+
 QT_BEGIN_NAMESPACE
 
 
--- old/qtbase/src/corelib/tools/qoffsetstringarray_p.h
+++ new/qtbase/src/corelib/tools/qoffsetstringarray_p.h
@@ -55,6 +55,7 @@
 
 #include <tuple>
 #include <array>
+#include <limits>
 
 QT_BEGIN_NAMESPACE