From bf0addefcad5eabf0910a6b14097b2e535f34361 Mon Sep 17 00:00:00 2001
From: Jeff Law <law@redhat.com>
Date: Wed, 4 Nov 2020 13:39:21 -0700
Subject: [PATCH] Fix missing #includes for gcc-11

---
 qt5-qtwebengine.spec    |  8 +++++++-
 qtwebengine-gcc11.patch | 40 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 1 deletion(-)
 create mode 100644 qtwebengine-gcc11.patch

diff --git a/qt5-qtwebengine.spec b/qt5-qtwebengine.spec
index fa49766..48291bc 100644
--- a/qt5-qtwebengine.spec
+++ b/qt5-qtwebengine.spec
@@ -53,7 +53,7 @@
 Summary: Qt5 - QtWebEngine components
 Name:    qt5-qtwebengine
 Version: 5.15.1
-Release: 2%{?dist}
+Release: 3%{?dist}
 
 # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
 # See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
@@ -99,6 +99,8 @@ Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch
 Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch
 # Use Python2
 Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch
+# Missing #includes for gcc-11
+Patch27: qtwebengine-gcc11.patch
 
 ## Upstream patches:
 
@@ -399,6 +401,7 @@ popd
 #patch21 -p1 -b .gn-bootstrap-verbose
 %patch24 -p1 -b .aarch64-new-stat
 %patch26 -p1 -b .use-python2
+%patch27 -p1 -b .gcc11
 
 # the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references
 # when building on older Qt releases
@@ -629,6 +632,9 @@ done
 
 
 %changelog
+* Wed Nov 04 2020 Jeff Law <law@redhat.com> - 5.15.1-3
+- Fix missing #includes for gcc-11
+
 * Wed Sep 23 12:52:56 CEST 2020 Jan Grulich <jgrulich@redhat.com> - 5.15.1-2
 - Rebuild (libevent)
 
diff --git a/qtwebengine-gcc11.patch b/qtwebengine-gcc11.patch
new file mode 100644
index 0000000..e6ab5d0
--- /dev/null
+++ b/qtwebengine-gcc11.patch
@@ -0,0 +1,40 @@
+diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc
+index b957d3ddd..2f9df34b0 100644
+--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc
++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/db/column.cc
+@@ -14,6 +14,7 @@
+  * limitations under the License.
+  */
+ 
++#include <limits>
+ #include "src/trace_processor/db/column.h"
+ 
+ #include "src/trace_processor/db/table.h"
+diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc
+index 020d3b4a9..fd405d179 100644
+--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc
++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/importers/proto/heap_graph_walker.cc
+@@ -14,6 +14,8 @@
+  * limitations under the License.
+  */
+ 
++#include <cstddef>
++
+ #include "src/trace_processor/importers/proto/heap_graph_walker.h"
+ #include "perfetto/base/logging.h"
+ 
+diff --git a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc
+index f02990069..df1c0eeb2 100644
+--- a/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc
++++ b/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/string_pool.cc
+@@ -14,9 +14,9 @@
+  * limitations under the License.
+  */
+ 
++#include <limits>
+ #include "src/trace_processor/string_pool.h"
+ 
+-#include <limits>
+ 
+ #include "perfetto/base/logging.h"
+ #include "perfetto/ext/base/utils.h"