From 5ef8a1ed7fbd45aad65298d5a6c39056ed1a4fa3 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 14 Nov 2013 21:58:03 +0100 Subject: [PATCH] libserialport: Allow C++ frontends to use the lib easily. --- libserialport.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libserialport.h b/libserialport.h index c5d3b9c..d60c2da 100644 --- a/libserialport.h +++ b/libserialport.h @@ -20,6 +20,10 @@ #ifndef LIBSERIALPORT_H #define LIBSERIALPORT_H +#ifdef __cplusplus +extern "C" { +#endif + #include #ifdef _WIN32 #include @@ -95,4 +99,8 @@ int sp_last_error_code(void); char *sp_last_error_message(void); void sp_free_error_message(char *message); +#ifdef __cplusplus +} +#endif + #endif /* LIBSERIALPORT_H */