Skip to content

Commit d2a08eb

Browse files
thiagomacieiralanglor-autodesk
authored andcommitted
Fix build with GCC 11: include <limits>
Keith Kyzivat: Cherry-picked from change-id listed below, but also includes manual fixes/changes necessary for Qt 5.15 that were not needed in Qt6 (dev branch that this came from) Fixes Maya: MAYA-125068 Fixes: QTBUG-90395 Change-Id: Iecc74d2000eb40dfbe7bfffd165b5dd3708b7a40
1 parent 874ce89 commit d2a08eb

File tree

4 files changed

+7
-2
lines changed

4 files changed

+7
-2
lines changed

src/corelib/global/qendian.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/****************************************************************************
22
**
3-
** Copyright (C) 2016 The Qt Company Ltd.
4-
** Copyright (C) 2016 Intel Corporation.
3+
** Copyright (C) 2021 The Qt Company Ltd.
4+
** Copyright (C) 2021 Intel Corporation.
55
** Contact: https://www.qt.io/licensing/
66
**
77
** This file is part of the QtCore module of the Qt Toolkit.
@@ -44,6 +44,8 @@
4444
#include <QtCore/qfloat16.h>
4545
#include <QtCore/qglobal.h>
4646

47+
#include <limits>
48+
4749
// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
4850
#include <stdlib.h>
4951
#include <string.h>

src/corelib/global/qfloat16.h

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
#include <QtCore/qglobal.h>
4545
#include <QtCore/qmetatype.h>
46+
#include <limits>
4647
#include <string.h>
4748

4849
#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)

src/corelib/text/qbytearraymatcher.h

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#define QBYTEARRAYMATCHER_H
4242

4343
#include <QtCore/qbytearray.h>
44+
#include <limits>
4445

4546
QT_BEGIN_NAMESPACE
4647

src/corelib/tools/qoffsetstringarray_p.h

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555

5656
#include <tuple>
5757
#include <array>
58+
#include <limits>
5859

5960
QT_BEGIN_NAMESPACE
6061

0 commit comments

Comments
 (0)