From 53c31d96e15eaf310dd2f82ff0fc0e1e9b6cb0bf Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Mon, 20 Jan 2014 01:59:11 +0000 Subject: Add C++ extern "C" See Issue 8 and Issue 12. --- dlfcn.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dlfcn.h b/dlfcn.h index dfc2551..deda9a8 100644 --- a/dlfcn.h +++ b/dlfcn.h @@ -20,6 +20,10 @@ #ifndef DLFCN_H #define DLFCN_H +#ifdef __cplusplus +extern "C" { +#endif + /* POSIX says these are implementation-defined. * To simplify use with Windows API, we treat them the same way. */ @@ -42,4 +46,8 @@ int dlclose( void *handle ); void *dlsym ( void *handle, const char *name ); char *dlerror( void ); +#ifdef __cplusplus +} +#endif + #endif /* DLFCN_H */ -- cgit v1.2.3-55-g6feb