Add 'extern "C" { }' so that C++ users can include the header directly. Signed-off-by: Kevin Cernekee <cernekee at gmail.com> --- openconnect.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/openconnect.h b/openconnect.h index e8bcb95..d8b94c2 100644 --- a/openconnect.h +++ b/openconnect.h @@ -24,6 +24,10 @@ #include <sys/types.h> #include <unistd.h> +#ifdef __cplusplus +extern "C" { +#endif + #ifdef _WIN32 #define uid_t unsigned #endif @@ -597,4 +601,8 @@ typedef int (*openconnect_getaddrinfo_vfn) (void *privdata, const char *node, co const struct addrinfo *hints, struct addrinfo **res); void openconnect_override_getaddrinfo(struct openconnect_info *vpninfo, openconnect_getaddrinfo_vfn gai_fn); +#ifdef __cplusplus +} +#endif + #endif /* __OPENCONNECT_H__ */ -- 1.9.1