Skip to content

Don't wrap foreign headers in extern "C" {...}

C headers are supposed to do this by themselves. On my system, this causes a build failure in a C++ header included as a transitive dependency:

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/glib-2.0/gobject/gbinding.h:28,
                 from /usr/include/glib-2.0/glib-object.h:22,
                 from /usr/include/glib-2.0/gio/gioenums.h:28,
                 from /usr/include/glib-2.0/gio/giotypes.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:26,
                 from /usr/include/flatpak/flatpak.h:26,
                 from /home/bernie/kde/src/discover/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.h:11,
                 from /home/bernie/kde/src/discover/libdiscover/backends/FlatpakBackend/FlatpakTransactionThread.cpp:7:
/usr/include/c++/10.2.0/type_traits:2930:3: error: template with C linkage
 2930 |   template<typename _Fn, typename... _Args>
      |   ^~~~~~~~
Edited by Bernie Innocenti

Merge request reports

Loading