summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2021-01-18 07:40:54 -0800
committerEdward Welbourne <edward.welbourne@qt.io>2021-02-03 19:00:03 +0100
commit0afad46bb71b106780dd641de768a81d9f6c6a51 (patch)
treebb6fb1b3260b3074f06d5620dc8346e4ead62529
parentf6bce4fc0ce015d089bb176403b7b196a73bff3e (diff)
Fix build with GCC 11: include <limits>
Fixes: QTBUG-90395 Change-Id: Iecc74d2000eb40dfbe7bfffd165b5dd3708b7a40 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> (cherry picked from commit 9c56d4da2ff631a8c1c30475bd792f6c86bda53c) Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r--src/corelib/global/qendian.h4
-rw-r--r--src/corelib/global/qfloat16.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index 2fe29e4338..3abd6a000c 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
-** Copyright (C) 2016 Intel Corporation.
+** Copyright (C) 2021 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
@@ -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>
diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
index 5b369bf3c5..6c52c94466 100644
--- a/src/corelib/global/qfloat16.h
+++ b/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__)