Add extern "C" around linenoise.h when compiled as C++
diff --git a/linenoise.h b/linenoise.h
index b0a168e..9549c91 100644
--- a/linenoise.h
+++ b/linenoise.h
@@ -37,6 +37,10 @@
#ifndef __LINENOISE_H
#define __LINENOISE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct linenoiseCompletions {
size_t len;
char **cvec;
@@ -54,4 +58,8 @@ int linenoiseHistoryLoad(const char *filename);
void linenoiseClearScreen(void);
void linenoiseSetMultiLine(int ml);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __LINENOISE_H */