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:
Erwin Rol 2019-09-17 16:08:50 +02:00 committed by Andrew Boie
commit 05e4856d09

View file

@ -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), \