From 05e4856d098d9527536537a32dda70ac0f6c950c Mon Sep 17 00:00:00 2001 From: Erwin Rol Date: Tue, 17 Sep 2019 16:08:50 +0200 Subject: [PATCH] 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 --- include/sys/__assert.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/sys/__assert.h b/include/sys/__assert.h index a8fc93961cd..a4f1824ff05 100644 --- a/include/sys/__assert.h +++ b/include/sys/__assert.h @@ -80,9 +80,19 @@ #endif #if __ASSERT_ON + #include + +#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), \