summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/include/sys/cdefs.h8
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