From 6bd492fa7975b90a3be31c65ba1fbafdd0002f0f Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Tue, 19 Apr 2011 22:58:36 +0200 Subject: 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. --- common/ring.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'common/ring.h') diff --git a/common/ring.h b/common/ring.h index defa1eda..133aad03 100644 --- a/common/ring.h +++ b/common/ring.h @@ -19,6 +19,10 @@ #ifndef _H_RING2 #define _H_RING2 +#ifdef __cplusplus +extern "C" { +#endif + typedef struct Ring RingItem; typedef struct Ring { RingItem *prev; @@ -129,5 +133,9 @@ static inline RingItem *ring_prev(Ring *ring, RingItem *pos) return (ret == ring) ? NULL : ret; } +#ifdef __cplusplus +} +#endif + #endif -- cgit