forked from pool/pulseview
f0d710e15b
- Fix build with GLib 2.68, add 0001-Fix-broken-build-due-to-C-template-behind-C-linkage.patch OBS-URL: https://build.opensuse.org/request/show/888884 OBS-URL: https://build.opensuse.org/package/show/electronics/pulseview?expand=0&rev=24
55 lines
1.8 KiB
Diff
55 lines
1.8 KiB
Diff
From a0548140aa7a1d48642e638e31d5efa8a6677b84 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Stefan=20Br=C3=BCns?= <stefan.bruens@rwth-aachen.de>
|
|
Date: Wed, 28 Apr 2021 02:14:47 +0200
|
|
Subject: [PATCH] Fix broken build due to C++ template behind C linkage
|
|
|
|
glib/gatomic.h since 2.68 includes type_traits, which causes a compilation
|
|
error:
|
|
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/libsigrokdecode/libsigrokdecode.h:25,
|
|
from /home/abuild/rpmbuild/BUILD/pulseview-0.4.2/pv/data/decode/annotation.cpp:21:
|
|
/usr/include/c++/10/type_traits:2308:3: error: template with C linkage
|
|
2308 | template<typename _CTp, typename _Rp>
|
|
|
|
As libsigrokdecode.h declares extern C linkage itself where necessary,
|
|
remove it from pulseviews include statements from the last two occasions.
|
|
---
|
|
pv/data/decode/annotation.cpp | 2 --
|
|
pv/views/trace/decodetrace.cpp | 2 --
|
|
2 files changed, 4 deletions(-)
|
|
|
|
diff --git a/pv/data/decode/annotation.cpp b/pv/data/decode/annotation.cpp
|
|
index 7c720430..5954a2a5 100644
|
|
--- a/pv/data/decode/annotation.cpp
|
|
+++ b/pv/data/decode/annotation.cpp
|
|
@@ -17,9 +17,7 @@
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
-extern "C" {
|
|
#include <libsigrokdecode/libsigrokdecode.h>
|
|
-}
|
|
|
|
#include <cassert>
|
|
#include <vector>
|
|
diff --git a/pv/views/trace/decodetrace.cpp b/pv/views/trace/decodetrace.cpp
|
|
index 509e77f6..5c93d07d 100644
|
|
--- a/pv/views/trace/decodetrace.cpp
|
|
+++ b/pv/views/trace/decodetrace.cpp
|
|
@@ -17,9 +17,7 @@
|
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
-extern "C" {
|
|
#include <libsigrokdecode/libsigrokdecode.h>
|
|
-}
|
|
|
|
#include <mutex>
|
|
|
|
--
|
|
2.31.1
|
|
|