diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-09-13 18:00:45 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-09-14 02:19:05 +0300 |
commit | f297400327eb6d2b66087f21f549cade62a990e2 (patch) | |
tree | 046d8adf5e5991db6bb7b03f6396cb1e09d1b7cf /libpkgconf/libpkgconf.h | |
parent | 06bcbc7a504a41612e766b7c791cd8a788b24cfa (diff) |
Add some C++ related fixes
Diffstat (limited to 'libpkgconf/libpkgconf.h')
-rw-r--r-- | libpkgconf/libpkgconf.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libpkgconf/libpkgconf.h b/libpkgconf/libpkgconf.h index 8a0031e..370bf9a 100644 --- a/libpkgconf/libpkgconf.h +++ b/libpkgconf/libpkgconf.h @@ -16,6 +16,13 @@ #ifndef LIBPKGCONF__LIBPKGCONF_H #define LIBPKGCONF__LIBPKGCONF_H +// Wrap the header content into the 'extern "C"' block, so C++ compiler can +// handle it properly (issue #136 is reported). +// +#ifdef __cplusplus +extern "C" { +#endif + #include <libpkgconf/stdinc.h> #include <libpkgconf/iter.h> #include <libpkgconf/bsdstubs.h> @@ -316,4 +323,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 +} /* end of the 'extern "C"' block */ +#endif + #endif |