From: Uwe Hermann Date: Thu, 14 Nov 2013 20:58:03 +0000 (+0100) Subject: libserialport: Allow C++ frontends to use the lib easily. X-Git-Tag: libserialport-0.1.0~131 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5ef8a1ed7fbd45aad65298d5a6c39056ed1a4fa3;p=libserialport.git libserialport: Allow C++ frontends to use the lib easily. --- 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 */