From 8327f4b825b8d43032d5ae9635a660705becfe89 Mon Sep 17 00:00:00 2001 From: Jiuzhu Dong Date: Mon, 12 Apr 2021 11:05:11 +0800 Subject: [PATCH] execinfo: add cplusplus support N/A Change-Id: Ided2e01c6dcc2d556fe8bccbe036601000d27552 Signed-off-by: Jiuzhu Dong --- include/execinfo.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/include/execinfo.h b/include/execinfo.h index 5fa5b359653..9907184f7c7 100644 --- a/include/execinfo.h +++ b/include/execinfo.h @@ -25,6 +25,15 @@ * Public Function Prototypes ****************************************************************************/ +#undef EXTERN +#if defined(__cplusplus) +#define EXTERN extern "C" +extern "C" +{ +#else +#define EXTERN extern +#endif + #if defined(CONFIG_EABI_UNWINDER) /* Store up to SIZE return address of the current program state in @@ -37,4 +46,9 @@ extern void dump_stack(void); # define dump_stack() #endif +#undef EXTERN +#if defined(__cplusplus) +} +#endif + #endif /* __INCLUDE_EXECINFO_H */