diff options
author | Ian Moffett <ian@osmora.org> | 2024-07-22 12:12:53 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-07-22 12:12:53 -0400 |
commit | e1c568025b6cefa99aea1bff1e87e5cd0ab1b1f2 (patch) | |
tree | 5d6683d8dfc9a604b9d3970313189850af317799 /sys/include | |
parent | dddc89fc5cf64bd087ff1f43a51850659ae4cd32 (diff) |
sysheaders: cdefs: Add __BEGIN_DECLS/__END_DECLS
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include')
-rw-r--r-- | sys/include/sys/cdefs.h | 8 |
1 files changed, 8 insertions, 0 deletions
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 |