summaryrefslogtreecommitdiff
path: root/lib/openbsd-tree.h
diff options
context:
space:
mode:
authorRafael Zalamena <rzalamena@gmail.com>2017-06-19 13:17:35 -0300
committerRafael Zalamena <rzalamena@gmail.com>2017-06-19 13:17:35 -0300
commit55087642701608628168205df671608727c91d25 (patch)
tree9fb9de39b3b2d8bdd2578ca03f8300f7c62b3af0 /lib/openbsd-tree.h
parent6021c8d38268ca67b58f1f5d29440782ee8826aa (diff)
lib: rename rb_tree to fix NetBSD compilation
Change rb_tree struct name to rbt_tree to avoid conflicts with NetBSD.
Diffstat (limited to 'lib/openbsd-tree.h')
-rw-r--r--lib/openbsd-tree.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/lib/openbsd-tree.h b/lib/openbsd-tree.h
index 8cf1a3df7f..8436615c27 100644
--- a/lib/openbsd-tree.h
+++ b/lib/openbsd-tree.h
@@ -312,7 +312,7 @@ struct rb_type {
unsigned int t_offset; /* offset of rb_entry in type */
};
-struct rb_tree {
+struct rbt_tree {
struct rb_entry *rbt_root;
};
@@ -325,30 +325,30 @@ struct rb_entry {
#define RB_HEAD(_name, _type) \
struct _name { \
- struct rb_tree rbh_root; \
+ struct rbt_tree rbh_root; \
}
#define RB_ENTRY(_type) struct rb_entry
static inline void
-_rb_init(struct rb_tree *rbt)
+_rb_init(struct rbt_tree *rbt)
{
rbt->rbt_root = NULL;
}
static inline int
-_rb_empty(struct rb_tree *rbt)
+_rb_empty(struct rbt_tree *rbt)
{
return (rbt->rbt_root == NULL);
}
-void *_rb_insert(const struct rb_type *, struct rb_tree *, void *);
-void *_rb_remove(const struct rb_type *, struct rb_tree *, void *);
-void *_rb_find(const struct rb_type *, struct rb_tree *, const void *);
-void *_rb_nfind(const struct rb_type *, struct rb_tree *, const void *);
-void *_rb_root(const struct rb_type *, struct rb_tree *);
-void *_rb_min(const struct rb_type *, struct rb_tree *);
-void *_rb_max(const struct rb_type *, struct rb_tree *);
+void *_rb_insert(const struct rb_type *, struct rbt_tree *, void *);
+void *_rb_remove(const struct rb_type *, struct rbt_tree *, void *);
+void *_rb_find(const struct rb_type *, struct rbt_tree *, const void *);
+void *_rb_nfind(const struct rb_type *, struct rbt_tree *, const void *);
+void *_rb_root(const struct rb_type *, struct rbt_tree *);
+void *_rb_min(const struct rb_type *, struct rbt_tree *);
+void *_rb_max(const struct rb_type *, struct rbt_tree *);
void *_rb_next(const struct rb_type *, void *);
void *_rb_prev(const struct rb_type *, void *);
void *_rb_left(const struct rb_type *, void *);