summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-11-04 09:50:22 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-11-04 09:50:22 +0000
commitedd3cff2f2ed9c7d2e9b243331729a8439036214 (patch)
tree554c8ef141ad4e2ae933e2f7f751984e08d87350
parentdcfb7a9f05032da72706adbfa8cbb69838412be0 (diff)
Some tweaks to build the rtable API and backends in userland.
Needed by the regression tests.
-rw-r--r--sys/net/art.c6
-rw-r--r--sys/net/radix.c7
-rw-r--r--sys/net/radix.h6
-rw-r--r--sys/net/rtable.c6
4 files changed, 17 insertions, 8 deletions
diff --git a/sys/net/art.c b/sys/net/art.c
index 0f8c1182c92..d984766a5b5 100644
--- a/sys/net/art.c
+++ b/sys/net/art.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: art.c,v 1.5 2015/10/14 10:09:30 mpi Exp $ */
+/* $OpenBSD: art.c,v 1.6 2015/11/04 09:50:21 mpi Exp $ */
/*
* Copyright (c) 2015 Martin Pieuchot
@@ -24,10 +24,14 @@
* http://www.hariguchi.org/art/art.pdf
*/
+#ifndef _KERNEL
+#include "kern_compat.h"
+#else
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/socket.h>
+#endif
#include <net/art.h>
diff --git a/sys/net/radix.c b/sys/net/radix.c
index a4fb08073d3..6b543dc3985 100644
--- a/sys/net/radix.c
+++ b/sys/net/radix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: radix.c,v 1.50 2015/10/08 08:41:58 mpi Exp $ */
+/* $OpenBSD: radix.c,v 1.51 2015/11/04 09:50:21 mpi Exp $ */
/* $NetBSD: radix.c,v 1.20 2003/08/07 16:32:56 agc Exp $ */
/*
@@ -36,11 +36,16 @@
* Routines to build and maintain radix trees for routing lookups.
*/
+#ifndef _KERNEL
+#include "kern_compat.h"
+#else
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/syslog.h>
#include <sys/pool.h>
+#endif
+
#include <net/radix.h>
#ifndef SMALL_KERNEL
diff --git a/sys/net/radix.h b/sys/net/radix.h
index b2360526be9..39196ce7439 100644
--- a/sys/net/radix.h
+++ b/sys/net/radix.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: radix.h,v 1.27 2015/10/08 08:41:58 mpi Exp $ */
+/* $OpenBSD: radix.h,v 1.28 2015/11/04 09:50:21 mpi Exp $ */
/* $NetBSD: radix.h,v 1.8 1996/02/13 22:00:37 christos Exp $ */
/*
@@ -97,8 +97,6 @@ struct radix_node_head {
u_int rnh_rtableid;
};
-#ifdef _KERNEL
-
void rn_init(unsigned int);
int rn_inithead(void **, int);
int rn_inithead0(struct radix_node_head *, int);
@@ -116,6 +114,4 @@ struct radix_node *rn_delete(void *, void *, struct radix_node_head *,
struct radix_node *rn_lookup(void *, void *, struct radix_node_head *);
struct radix_node *rn_match(void *, struct radix_node_head *);
-#endif /* _KERNEL */
-
#endif /* _NET_RADIX_H_ */
diff --git a/sys/net/rtable.c b/sys/net/rtable.c
index 8b5fd91c5a6..414643d7817 100644
--- a/sys/net/rtable.c
+++ b/sys/net/rtable.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtable.c,v 1.17 2015/11/04 09:48:09 mpi Exp $ */
+/* $OpenBSD: rtable.c,v 1.18 2015/11/04 09:50:21 mpi Exp $ */
/*
* Copyright (c) 2014-2015 Martin Pieuchot
@@ -16,6 +16,9 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
+#ifndef _KERNEL
+#include "kern_compat.h"
+#else
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/socket.h>
@@ -23,6 +26,7 @@
#include <sys/pool.h>
#include <sys/queue.h>
#include <sys/domain.h>
+#endif
#include <net/rtable.h>
#include <net/route.h>