commit 233f8a8d90e423638f99f8e5fd7849f427df98b6
Author: Vitaly Zaitsev <vitaly(a)easycoding.org>
Date: Fri Aug 31 18:44:06 2018 +0200
Fixed internal compiler error.
telegram-desktop-fix-regression.patch | 26 ++++++++++++++++++++++++++
telegram-desktop.spec | 3 +++
2 files changed, 29 insertions(+)
---
diff --git a/telegram-desktop-fix-regression.patch
b/telegram-desktop-fix-regression.patch
new file mode 100644
index 0000000..34d13e0
--- /dev/null
+++ b/telegram-desktop-fix-regression.patch
@@ -0,0 +1,26 @@
+From 82e98125634007415a4e442b6ad99bee240f4c95 Mon Sep 17 00:00:00 2001
+From: Nicholas Guriev <guriev-ns(a)ya.ru>
+Date: Fri, 31 Aug 2018 00:28:27 +0300
+Subject: [PATCH] Workaround internal compiler error in GCC
+
+Closes: #5111
+---
+ Telegram/SourceFiles/apiwrap.cpp | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/Telegram/SourceFiles/apiwrap.cpp b/Telegram/SourceFiles/apiwrap.cpp
+index 3301b6f04..4dcdd0c5d 100644
+--- a/Telegram/SourceFiles/apiwrap.cpp
++++ b/Telegram/SourceFiles/apiwrap.cpp
+@@ -2390,7 +2390,10 @@ void ApiWrap::requestFileReference(
+
+ request(std::move(data)).done([=](const auto &result) {
+ const auto parsed = Data::GetFileReferences(result);
+- for (const auto &[origin, reference] : parsed) {
++ for (const auto &p : parsed) {
++ // Unpack here the parsed pair by hand to workaround a GCC bug.
++ // See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87122
++ const auto &origin = p.first, &reference = p.second;
+ const auto documentId = base::get_if<DocumentFileLocationId>(
+ &origin);
+ if (documentId) {
diff --git a/telegram-desktop.spec b/telegram-desktop.spec
index 8e56597..746fddb 100644
--- a/telegram-desktop.spec
+++ b/telegram-desktop.spec
@@ -30,6 +30,9 @@ Patch0: %{name}-build-fixes.patch
Patch1: %{name}-api-tokens.patch
Patch2: %{name}-system-fonts.patch
+#
https://github.com/telegramdesktop/tdesktop/pull/5124
+Patch100: %{name}-fix-regression.patch
+
Recommends: libappindicator-gtk3%{?_isa}
Requires: qt5-qtimageformats%{?_isa}
Requires: hicolor-icon-theme