]> wimlib.net Git - wimlib/blobdiff - src/rbtree.h
rbtree: Use uintptr_t instead of unsigned long
[wimlib] / src / rbtree.h
index 583230e0e787bfa8688b6bf1fe2a44bc56612327..c9321a68c35a2fd0f88d601fa19624292f80c7fa 100644 (file)
 #define        _LINUX_RBTREE_H
 
 #include "util.h"
+#include <stdint.h>
 
 struct rb_node {
-       unsigned long  __rb_parent_color;
+       uintptr_t  __rb_parent_color;
        struct rb_node *rb_right;
        struct rb_node *rb_left;
 };
@@ -51,7 +52,7 @@ extern void rb_erase(struct rb_node *, struct rb_root *);
 static inline void rb_link_node(struct rb_node * node, struct rb_node * parent,
                                struct rb_node ** rb_link)
 {
-       node->__rb_parent_color = (unsigned long)parent;
+       node->__rb_parent_color = (uintptr_t)parent;
        node->rb_left = node->rb_right = NULL;
 
        *rb_link = node;