diff options
author | David Sterba <dsterba@suse.cz> | 2014-11-03 23:50:50 +0100 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2014-11-03 23:50:50 +0100 |
commit | cafacda441120976105d01c07286e843cb7cbb94 (patch) | |
tree | f46ae085fa3252cf68155d1e25c5cf87419116fb /rbtree.h | |
parent | 2f55fd70191ed3e204cbe589af34a8c678dceab6 (diff) | |
download | btrfs-progs-cafacda441120976105d01c07286e843cb7cbb94.tar.gz btrfs-progs-cafacda441120976105d01c07286e843cb7cbb94.tar.bz2 btrfs-progs-cafacda441120976105d01c07286e843cb7cbb94.zip |
btrfs-progs: libbtrfs, make exported headers compatible with C++
Add externs and don't use a reserved keyword.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'rbtree.h')
-rw-r--r-- | rbtree.h | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -34,6 +34,10 @@ #include <btrfs/kerncompat.h> #endif /* BTRFS_FLAT_INCLUDES */ +#ifdef __cplusplus +extern "C" { +#endif + struct rb_node { unsigned long __rb_parent_color; struct rb_node *rb_right; @@ -75,7 +79,7 @@ extern struct rb_node *rb_first_postorder(const struct rb_root *); extern struct rb_node *rb_next_postorder(const struct rb_node *); /* Fast replacement of a single node without remove/rebalance/add/rebalance */ -extern void rb_replace_node(struct rb_node *victim, struct rb_node *new, +extern void rb_replace_node(struct rb_node *victim, struct rb_node *new_node, struct rb_root *root); static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, @@ -107,4 +111,8 @@ static inline void rb_link_node(struct rb_node * node, struct rb_node * parent, typeof(*pos), field); 1; }); \ pos = n) +#ifdef __cplusplus +} +#endif + #endif /* _LINUX_RBTREE_H */ |