Skip to content

Commit

Permalink
Fix broken build due to C++ template behind C linkage
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
StefanBruens authored and abraxa committed Jun 22, 2021
1 parent 852a251 commit ed643f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions pv/data/decode/annotation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
2 changes: 0 additions & 2 deletions pv/views/trace/decodetrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit ed643f0

Please sign in to comment.