execinfo: include-able from C++ files

Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an 2021-04-12 11:05:11 +08:00 committed by David Sidrane
parent b2016e85f5
commit d5753125db
1 changed files with 14 additions and 0 deletions

View File

@ -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 */