Skip to content

Commit

Permalink
Fix build with GCC 11: include <limits>
Browse files Browse the repository at this point in the history
Fixes: QTBUG-90395
Pick-to: 6.0
Change-Id: Iecc74d2000eb40dfbe7bfffd165b5dd3708b7a40
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
  • Loading branch information
thiagomacieira committed Jan 19, 2021
1 parent 790b600 commit 9c56d4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/corelib/global/qendian.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Copyright (C) 2016 Intel Corporation.
** Copyright (C) 2021 The Qt Company Ltd.
** Copyright (C) 2021 Intel Corporation.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtCore module of the Qt Toolkit.
Expand Down Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions src/corelib/global/qfloat16.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
#include <QtCore/qglobal.h>
#include <QtCore/qmetatype.h>
#include <QtCore/qnamespace.h>
#include <limits>
#include <string.h>

#if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)
Expand Down

0 comments on commit 9c56d4d

Please sign in to comment.