]> git.puffer.fish Git - matthieu/frr.git/commitdiff
lib: add missing extern "C" {} blocks to new headers
authorRenato Westphal <renato@opensourcerouting.org>
Mon, 20 May 2019 21:52:16 +0000 (18:52 -0300)
committerRenato Westphal <renato@opensourcerouting.org>
Tue, 21 May 2019 18:56:18 +0000 (15:56 -0300)
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
lib/typerb.h
lib/typesafe.h

index 3d8db06fe08b831e087e8cd0a2f0ecacce59e941..ce8446f853a901c503e5c09105ba2277aa3f1202 100644 (file)
 
 #include "typesafe.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct typed_rb_entry {
        struct typed_rb_entry *rbt_parent;
        struct typed_rb_entry *rbt_left;
@@ -179,4 +183,8 @@ macro_inline int prefix ## __cmp_uq(const struct typed_rb_entry *a,            \
 _DECLARE_RBTREE(prefix, type, field, prefix ## __cmp, prefix ## __cmp_uq)      \
 /* ... */
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _FRR_TYPERB_H */
index 6df3a07efe95ebac3f7d4801c3c029f8b59acd10..6829b0a388c2257ae3eb158d330299266d28d669 100644 (file)
 #include <assert.h>
 #include "compiler.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /* generic macros for all list-like types */
 
 #define for_each(prefix, head, item)                                           \
@@ -850,6 +854,10 @@ extern void typesafe_skiplist_del(struct sskip_head *head,
                        const struct sskip_item *b));
 extern struct sskip_item *typesafe_skiplist_pop(struct sskip_head *head);
 
+#ifdef __cplusplus
+}
+#endif
+
 /* this needs to stay at the end because both files include each other.
  * the resolved order is typesafe.h before typerb.h
  */