Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/netstat Make sure netstat builds with -DSMALL



details:   https://anonhg.NetBSD.org/src/rev/57ba7c2e44aa
branches:  trunk
changeset: 808587:57ba7c2e44aa
user:      manu <manu%NetBSD.org@localhost>
date:      Mon May 25 03:56:20 2015 +0000

description:
Make sure netstat builds with -DSMALL

src/usr.bin/netstat relies on code from src/sbin/route. WHen building
with -DSMALL, some functions such as mpls_ntoa() or p_rtrmx() are not
built in src/sbin/route. We therefore have to make sure they are not
used in src/usr.bin/netstat.

diffstat:

 usr.bin/netstat/route.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (45 lines):

diff -r ca1ee37d316e -r 57ba7c2e44aa usr.bin/netstat/route.c
--- a/usr.bin/netstat/route.c   Sun May 24 22:30:22 2015 +0000
+++ b/usr.bin/netstat/route.c   Mon May 25 03:56:20 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: route.c,v 1.83 2014/11/06 21:30:09 christos Exp $      */
+/*     $NetBSD: route.c,v 1.84 2015/05/25 03:56:20 manu Exp $  */
 
 /*
  * Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "from: @(#)route.c      8.3 (Berkeley) 3/9/94";
 #else
-__RCSID("$NetBSD: route.c,v 1.83 2014/11/06 21:30:09 christos Exp $");
+__RCSID("$NetBSD: route.c,v 1.84 2015/05/25 03:56:20 manu Exp $");
 #endif
 #endif /* not lint */
 
@@ -262,6 +262,7 @@
                printf("%6s", "-");
        putchar((rt->rt_rmx.rmx_locks & RTV_MTU) ? 'L' : ' ');
        if (tagflag == 1) {
+#ifndef SMALL
                if (rt->rt_tag != NULL) {
                        const struct sockaddr *tagsa = kgetsa(rt->rt_tag);
                        char *tagstr;
@@ -276,6 +277,7 @@
                        else
                                printf("%7s", "-");
                } else
+#endif
                        printf("%7s", "-");
        }
        if (rt->rt_ifp) {
@@ -287,8 +289,10 @@
                        rt->rt_nodes[0].rn_dupedkey ? " =>" : "");
        }
        putchar('\n');
+#ifndef SMALL
        if (vflag)
                p_rtrmx(&rt->rt_rmx);
+#endif
 }
 
 /*



Home | Main Index | Thread Index | Old Index