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 @@ -20,6 +20,10 @@ #ifndef INCLUDE_XO_H #define INCLUDE_XO_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #include #include #include @@ -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_buf.h b/contrib/libxo/libxo/xo_buf.h --- a/contrib/libxo/libxo/xo_buf.h +++ b/contrib/libxo/libxo/xo_buf.h @@ -19,6 +19,10 @@ #ifndef XO_BUF_H #define XO_BUF_H +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + #define XO_BUFSIZ (8*1024) /* Initial buffer size */ #define XO_BUF_HIGH_WATER (XO_BUFSIZ - 512) /* When to auto-flush */ /* @@ -160,4 +164,8 @@ xbp->xb_curp += len; } +#ifdef __cplusplus +} +#endif /* __cplusplus */ + #endif /* XO_BUF_H */