diff --git a/sbin/route/Makefile b/sbin/route/Makefile index eeef57779408..f2efac6d94fa 100644 --- a/sbin/route/Makefile +++ b/sbin/route/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2006/08/26 15:26:02 matt Exp $ +# $NetBSD: Makefile,v 1.24 2010/11/04 23:36:10 pooka Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 .include @@ -20,4 +20,15 @@ CPPFLAGS+=-DINET6 # keywords.c keywords.h : keywords.sh # ${HOST_SH} keywords.sh +# +# Compile-time debug flag. If compiled with "make RUMP_ACTION=1", +# make rump system calls. +# +.ifdef RUMP_ACTION +CPPFLAGS+= -DRUMP_SYS_NETWORKING -DRUMP_SYS_READWRITE -DRUMP_SYS_CLOSE +CPPFLAGS+= -DRUMP_ACTION -DSMALL -Dsysctl=rump_sys___sysctl +LDADD+= -lrumpclient +DBG= -g +.endif + .include diff --git a/sbin/route/route.c b/sbin/route/route.c index 8c5a5f87484c..b6eddc88b057 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -1,4 +1,4 @@ -/* $NetBSD: route.c,v 1.121 2010/06/26 14:29:36 kefren Exp $ */ +/* $NetBSD: route.c,v 1.122 2010/11/04 23:36:10 pooka Exp $ */ /* * Copyright (c) 1983, 1989, 1991, 1993 @@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1989, 1991, 1993\ #if 0 static char sccsid[] = "@(#)route.c 8.6 (Berkeley) 4/28/95"; #else -__RCSID("$NetBSD: route.c,v 1.121 2010/06/26 14:29:36 kefren Exp $"); +__RCSID("$NetBSD: route.c,v 1.122 2010/11/04 23:36:10 pooka Exp $"); #endif #endif /* not lint */ @@ -71,6 +71,12 @@ __RCSID("$NetBSD: route.c,v 1.121 2010/06/26 14:29:36 kefren Exp $"); #include #include +#ifdef RUMP_ACTION +#include +#include +#include +#endif + #include "keywords.h" #include "extern.h" @@ -154,7 +160,12 @@ usage(const char *cp) int main(int argc, char * const *argv) { - int ch; + int ch, error; + +#ifdef RUMP_ACTION + if ((error = rumpclient_init()) != 0) + errx(1, "rump client init: %s", strerror(error)); +#endif if (argc < 2) usage(NULL);