From e1c568025b6cefa99aea1bff1e87e5cd0ab1b1f2 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Mon, 22 Jul 2024 12:12:53 -0400 Subject: sysheaders: cdefs: Add __BEGIN_DECLS/__END_DECLS Signed-off-by: Ian Moffett --- sys/include/sys/cdefs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sys/include/sys/cdefs.h b/sys/include/sys/cdefs.h index 32d7786..e5d5531 100644 --- a/sys/include/sys/cdefs.h +++ b/sys/include/sys/cdefs.h @@ -40,6 +40,14 @@ #define __unlikely(exp) __builtin_expect(((exp) != 0), 0) #define __static_assert _Static_assert +#if defined(__cplusplus) +#define __BEGIN_DECLS extern "C" { +#define __END_DECLS } +#else +#define __BEGIN_DECLS +#define __END_DECLS +#endif + #if defined(_KERNEL) /* * Align data on a cache line boundary. This is -- cgit v1.2.3