diff --git a/libpkgconf/bsdstubs.h b/libpkgconf/bsdstubs.h index 2e0fb5c..8f37b70 100644 --- a/libpkgconf/bsdstubs.h +++ b/libpkgconf/bsdstubs.h @@ -18,8 +18,16 @@ #include +#ifdef __cplusplus +extern "C" { +#endif + PKGCONF_API extern size_t pkgconf_strlcpy(char *dst, const char *src, size_t siz); PKGCONF_API extern size_t pkgconf_strlcat(char *dst, const char *src, size_t siz); PKGCONF_API extern char *pkgconf_strndup(const char *src, size_t len); +#ifdef __cplusplus +} +#endif + #endif diff --git a/libpkgconf/iter.h b/libpkgconf/iter.h index 59cfac3..d90b402 100644 --- a/libpkgconf/iter.h +++ b/libpkgconf/iter.h @@ -16,6 +16,10 @@ #ifndef PKGCONF__ITER_H #define PKGCONF__ITER_H +#ifdef __cplusplus +extern "C" { +#endif + typedef struct pkgconf_node_ pkgconf_node_t; struct pkgconf_node_ { @@ -94,4 +98,8 @@ pkgconf_node_delete(pkgconf_node_t *node, pkgconf_list_t *list) node->next->prev = node->prev; } +#ifdef __cplusplus +} +#endif + #endif diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h index 1a3ca8c..4c2a53b 100644 --- a/libpkgconf/libpkgconf.h +++ b/libpkgconf/libpkgconf.h @@ -21,6 +21,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* pkg-config uses ';' on win32 as ':' is part of path */ #ifdef _WIN32 #define PKG_CONFIG_PATH_SEP_S ";" @@ -317,4 +321,8 @@ PKGCONF_API bool pkgconf_path_match_list(const char *path, const pkgconf_list_t PKGCONF_API void pkgconf_path_free(pkgconf_list_t *dirlist); PKGCONF_API bool pkgconf_path_relocate(char *buf, size_t buflen); +#ifdef __cplusplus +} +#endif + #endif