sys/__assert.h: Fix __assert.h so it can be included in C++ code
Add extern "C" to __assert.h so it can be included into C++ code. Signed-off-by: Erwin Rol <erwin@erwinrol.com>
This commit is contained in:
parent
d2edfa2347
commit
05e4856d09
1 changed files with 10 additions and 0 deletions
|
@ -80,9 +80,19 @@
|
|||
#endif
|
||||
|
||||
#if __ASSERT_ON
|
||||
|
||||
#include <sys/printk.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void assert_post_action(const char *file, unsigned int line);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#define __ASSERT_LOC(test) \
|
||||
printk("ASSERTION FAIL [%s] @ %s:%d\n", \
|
||||
Z_STRINGIFY(test), \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue