From 4a1a95442b095b06f492b34b0ab8dd1d5ac820a0 Mon Sep 17 00:00:00 2001 From: tianmc1 <86271793+tianmc1@users.noreply.github.com> Date: Fri, 23 Jul 2021 11:40:53 -0700 Subject: [PATCH] Added CPP guard for header files (#90) --- source/include/shadow.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/include/shadow.h b/source/include/shadow.h index fd015737..8f9e77ae 100644 --- a/source/include/shadow.h +++ b/source/include/shadow.h @@ -31,6 +31,12 @@ /* Standard includes. */ #include +/* *INDENT-OFF* */ +#ifdef __cplusplus + extern "C" { +#endif +/* *INDENT-ON* */ + /* SHADOW_DO_NOT_USE_CUSTOM_CONFIG allows building the Shadow library * without a custom config. If a custom config is provided, the * SHADOW_DO_NOT_USE_CUSTOM_CONFIG macro should not be defined. */ @@ -1055,4 +1061,10 @@ ShadowStatus_t Shadow_MatchTopic( const char * pTopic, uint16_t * pThingNameLength ); /* @[declare_shadow_matchtopic] */ +/* *INDENT-OFF* */ +#ifdef __cplusplus + } +#endif +/* *INDENT-ON* */ + #endif /* ifndef SHADOW_H_ */