From 7d8a20cfb408ed95a173c94b409ea9234af1ee1f Mon Sep 17 00:00:00 2001 From: hsu Date: Sat, 8 Feb 2003 01:44:09 +0000 Subject: Make the radix tree code compilable in userland. Requested by ru. Some style fixes requested by bde. --- sys/net/radix.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sys/net/radix.c') diff --git a/sys/net/radix.c b/sys/net/radix.c index 17449c2..345ed58 100644 --- a/sys/net/radix.c +++ b/sys/net/radix.c @@ -40,6 +40,8 @@ #ifndef _RADIX_H_ #include #ifdef _KERNEL +#include +#include #include #include #include @@ -1027,7 +1029,9 @@ rn_inithead(head, off) if (rnh == 0) return (0); Bzero(rnh, sizeof (*rnh)); +#ifdef _KERNEL RADIX_NODE_HEAD_LOCK_INIT(rnh); +#endif *head = rnh; t = rn_newpair(rn_zeros, off, rnh->rnh_nodes); ttt = rnh->rnh_nodes + 2; -- cgit v1.1