You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/net-im/telegram-desktop/files/tdesktop-2.8.9-webview-fix-...

32 lines
1.8 KiB

Fixes an issue with glib headers including a C++ header inside extern "C"
This patch is a hacky workaround, proper solution doesn't seem trivial.
In file included from /usr/include/glib-2.0/glib/gatomic.h:31,
from /usr/include/glib-2.0/glib/gthread.h:32,
from /usr/include/glib-2.0/glib/gasyncqueue.h:32,
from /usr/include/glib-2.0/glib.h:32,
from /usr/include/gtk-3.0/gdk/gdkconfig.h:13,
from /usr/include/gtk-3.0/gdk/gdk.h:30,
from /usr/include/gtk-3.0/gtk/gtk.h:30,
from /var/tmp/portage/net-im/telegram-desktop-2.8.9/work/tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h:11,
from /var/tmp/portage/net-im/telegram-desktop-2.8.9/work/tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp:7:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.1.0/include/g++-v11/type_traits:56:3: error: template with C linkage
56 | template<typename _Tp, _Tp __v>
| ^~~~~~~~
In file included from /var/tmp/portage/net-im/telegram-desktop-2.8.9/work/tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.cpp:7:
/var/tmp/portage/net-im/telegram-desktop-2.8.9/work/tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h:9:1: note: extern "C" linkage started here
9 | extern "C" {
| ^~~~~~~~~~
--- tdesktop-2.8.9-full.orig/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h
+++ tdesktop-2.8.9-full/Telegram/lib_webview/webview/platform/linux/webview_linux_webkit_gtk.h
@@ -6,6 +6,7 @@
//
#pragma once
+#include <type_traits> // Required for glib/gatomic.h
extern "C" {
#include <JavaScriptCore/JavaScript.h>
#include <gtk/gtk.h>