summaryrefslogtreecommitdiffstats
path: root/common/marshaller.h
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-04-19 22:58:36 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-05-02 11:24:44 +0200
commit60373e01fa9273751b037998329645072e21e837 (patch)
tree148aaaa1cc1ceed9f7a40098267564f7b633f882 /common/marshaller.h
parent06c83ca99458f611d871936c9d1bf433703a8f05 (diff)
downloadspice-60373e01fa9273751b037998329645072e21e837.tar.gz
spice-60373e01fa9273751b037998329645072e21e837.tar.xz
spice-60373e01fa9273751b037998329645072e21e837.zip
common: add extern "C" guards to headers
Since some spice C++ code is using code from common/, the C functions need to be marked as such for the C++ compiler, otherwise we'll get linkage issues.
Diffstat (limited to 'common/marshaller.h')
-rw-r--r--common/marshaller.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/marshaller.h b/common/marshaller.h
index 4d771401..0a61fefd 100644
--- a/common/marshaller.h
+++ b/common/marshaller.h
@@ -25,6 +25,10 @@
#include <sys/uio.h>
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct SpiceMarshaller SpiceMarshaller;
typedef void (*spice_marshaller_item_free_func)(uint8_t *data, void *opaque);
@@ -63,4 +67,8 @@ void *spice_marshaller_add_int8(SpiceMarshaller *m, int8_t v);
void spice_marshaller_set_uint32(SpiceMarshaller *m, void *ref, uint32_t v);
+#ifdef __cplusplus
+}
+#endif
+
#endif