]> sigrok.org Git - pulseview.git/commitdiff
Fix broken build due to C++ template behind C linkage
authorStefan Brüns <redacted>
Wed, 28 Apr 2021 00:14:47 +0000 (02:14 +0200)
committerSoeren Apel <redacted>
Tue, 22 Jun 2021 16:10:07 +0000 (18:10 +0200)
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
pv/views/trace/decodetrace.cpp

index 7f2334788f70f93c2a734d680c90d6a8b957d293..f8a5c47b66236a8be66327a2c9ea05568970749f 100644 (file)
@@ -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>
index 409f1d282abc209d7753509b42f2c810abf2f5eb..888064d09e12583cde3937eaab98fdee725e43bc 100644 (file)
@@ -17,9 +17,7 @@
  * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
-extern "C" {
 #include <libsigrokdecode/libsigrokdecode.h>
-}
 
 #include <limits>
 #include <mutex>