summaryrefslogtreecommitdiffstats
path: root/common/messages.h
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-04-19 22:58:36 +0200
committerAlon Levy <alevy@redhat.com>2011-07-21 15:09:27 +0300
commit6bd492fa7975b90a3be31c65ba1fbafdd0002f0f (patch)
treef2a566ef234af22cd630f7a26c983af3a02c4565 /common/messages.h
parent3dab7bda53901a80e15b98392fb8948b2f298ca1 (diff)
downloadspice-6bd492fa7975b90a3be31c65ba1fbafdd0002f0f.tar.gz
spice-6bd492fa7975b90a3be31c65ba1fbafdd0002f0f.tar.xz
spice-6bd492fa7975b90a3be31c65ba1fbafdd0002f0f.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/messages.h')
-rw-r--r--common/messages.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/common/messages.h b/common/messages.h
index 1a60a9fa..6fcd8bea 100644
--- a/common/messages.h
+++ b/common/messages.h
@@ -34,6 +34,10 @@
#include <spice/protocol.h>
#include "draw.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct SpiceMsgData {
uint32_t data_size;
uint8_t data[0];
@@ -494,6 +498,8 @@ typedef struct SpiceMsgcTunnelSocketTokens {
uint32_t num_tokens;
} SpiceMsgcTunnelSocketTokens;
-#endif /* _H_SPICE_PROTOCOL */
-
+#ifdef __cplusplus
+}
+#endif
+#endif /* _H_SPICE_PROTOCOL */