Skip to content
  • Jonathon Jongsma's avatar
    Don't wrap included headers in G_BEGIN|END_DECLS · 9c47d3a3
    Jonathon Jongsma authored
    Only the local declarations should be declared extern "C", otherwise it
    can result in unexpected errors such as this (encountered while re-ordering
    some include statements for a different patch):
    
      CC       channel-inputs.lo
    In file included from /usr/include/glib-2.0/glib/gmacros.h:38:0,
                     from /usr/lib64/glib-2.0/include/glibconfig.h:9,
                     from /usr/include/glib-2.0/glib/gtypes.h:32,
                     from /usr/include/glib-2.0/glib/galloca.h:32,
                     from /usr/include/glib-2.0/glib.h:30,
                     from /usr/include/glib-2.0/gobject/gbinding.h:28,
                     from /usr/include/glib-2.0/glib-object.h:23,
                     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 ../../src/spice-channel.h:27,
                     from ../../src/channel-inputs.h:25,
                     from ../../src/channel-inputs.c:20:
    /usr/lib/gcc/x86_64-redhat-linux/4.9.2/include/stddef.h:147:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'typedef'
     typedef __PTRDIFF_TYPE__ ptrdiff_t;
     ^
    9c47d3a3