Commit 53c31d96e15eaf310dd2f82ff0fc0e1e9b6cb0bf

Timothy Gu 2014-01-20T01:59:11

Add C++ extern "C" See Issue 8 and Issue 12.

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 */