"Fossies" - the Fresh Open Source Software Archive

Member "buildroot-2021.05/package/qt5/qt5base/0006-Fix-build-with-GCC-11-include-limits.patch" (6 Jun 2021, 1834 Bytes) of package /linux/privat/buildroot-2021.05.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Diff source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 From 9c56d4da2ff631a8c1c30475bd792f6c86bda53c Mon Sep 17 00:00:00 2001
    2 From: Thiago Macieira <thiago.macieira@intel.com>
    3 Date: Mon, 18 Jan 2021 07:40:54 -0800
    4 Subject: [PATCH] Fix build with GCC 11: include <limits>
    5 
    6 Fixes: QTBUG-90395
    7 Pick-to: 6.0
    8 Change-Id: Iecc74d2000eb40dfbe7bfffd165b5dd3708b7a40
    9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
   10 
   11 [Retrieved (and backported) from:
   12 https://github.com/qt/qtbase/commit/9c56d4da2ff631a8c1c30475bd792f6c86bda53c]
   13 Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
   14 ---
   15  src/corelib/global/qendian.h  | 6 ++++--
   16  src/corelib/global/qfloat16.h | 1 +
   17  2 files changed, 5 insertions(+), 2 deletions(-)
   18 
   19 diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
   20 index 99b529f17cd..c874c5e47ab 100644
   21 --- a/src/corelib/global/qendian.h
   22 +++ b/src/corelib/global/qendian.h
   23 @@ -1,7 +1,7 @@
   24  /****************************************************************************
   25  **
   26 -** Copyright (C) 2016 The Qt Company Ltd.
   27 -** Copyright (C) 2016 Intel Corporation.
   28 +** Copyright (C) 2021 The Qt Company Ltd.
   29 +** Copyright (C) 2021 Intel Corporation.
   30  ** Contact: https://www.qt.io/licensing/
   31  **
   32  ** This file is part of the QtCore module of the Qt Toolkit.
   33 @@ -44,6 +44,8 @@
   34  #include <QtCore/qfloat16.h>
   35  #include <QtCore/qglobal.h>
   36  
   37 +#include <limits>
   38 +
   39  // include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
   40  #include <stdlib.h>
   41  #include <string.h>
   42 diff --git a/src/corelib/global/qfloat16.h b/src/corelib/global/qfloat16.h
   43 index e9477d2ecec..a25fac28862 100644
   44 --- a/src/corelib/global/qfloat16.h
   45 +++ b/src/corelib/global/qfloat16.h
   46 @@ -44,6 +44,7 @@
   47 
   48  #include <QtCore/qglobal.h>
   49  #include <QtCore/qmetatype.h>
   50 +#include <limits>
   51  #include <string.h>
   52  
   53  #if defined(QT_COMPILER_SUPPORTS_F16C) && defined(__AVX2__) && !defined(__F16C__)