diff --git a/contrib/libxo/libxo/xo.h b/contrib/libxo/libxo/xo.h --- a/contrib/libxo/libxo/xo.h +++ b/contrib/libxo/libxo/xo.h @@ -27,6 +27,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #ifdef __dead2 #define NORETURN __dead2 #else @@ -699,4 +703,8 @@ void xo_retain_clear (const char *fmt); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* INCLUDE_XO_H */ diff --git a/contrib/libxo/libxo/xo_encoder.h b/contrib/libxo/libxo/xo_encoder.h --- a/contrib/libxo/libxo/xo_encoder.h +++ b/contrib/libxo/libxo/xo_encoder.h @@ -20,6 +20,10 @@ #include +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + /* * Expose libxo's memory allocation functions */ @@ -167,4 +171,8 @@ void xo_failure (xo_handle_t *xop, const char *fmt, ...); +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* XO_ENCODER_H */