From 32e7a7fde0afae1eeffe86f35e15f5564f68eb89 Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Wed, 7 Jul 2021 11:24:31 +0800 Subject: [PATCH] nshlib: support c++ access nsh api N/A Change-Id: I90de4a4ce1f089a2db2e3b81f83f7b39434d6421 Signed-off-by: Jiuzhu Dong --- nshlib/nsh.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nshlib/nsh.h b/nshlib/nsh.h index bac0c7929..e2659310c 100644 --- a/nshlib/nsh.h +++ b/nshlib/nsh.h @@ -799,6 +799,11 @@ extern const char g_fmtsignalrecvd[]; * Public Function Prototypes ****************************************************************************/ +#if defined(__cplusplus) +extern "C" +{ +#endif + /* Initialization */ #ifdef CONFIG_NSH_ROMFSETC @@ -1403,4 +1408,8 @@ int nsh_foreach_var(FAR struct nsh_vtbl_s *vtbl, nsh_foreach_var_t cb, FAR void *arg); #endif +#if defined(__cplusplus) +} +#endif + #endif /* __APPS_NSHLIB_NSH_H */