Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Jan 2009 18:23:13 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org
Subject:   svn commit: r187229 - in stable/7/usr.bin: calendar cksum comm cpuset fetch file gzip ipcrm ipcs kdump ktrace ldd lockf logger make netstat nsupdate procstat sed shar su tar top truncate truss unit...
Message-ID:  <200901141823.n0EINDgS050409@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Wed Jan 14 18:23:13 2009
New Revision: 187229
URL: http://svn.freebsd.org/changeset/base/187229

Log:
  bring in bits missed in r187106: sync build infrastructure changes with HEAD
  
  Noticed by:	attilio

Modified:
  stable/7/usr.bin/calendar/   (props changed)
  stable/7/usr.bin/cksum/   (props changed)
  stable/7/usr.bin/comm/   (props changed)
  stable/7/usr.bin/cpuset/   (props changed)
  stable/7/usr.bin/fetch/   (props changed)
  stable/7/usr.bin/file/   (props changed)
  stable/7/usr.bin/gzip/   (props changed)
  stable/7/usr.bin/ipcrm/   (props changed)
  stable/7/usr.bin/ipcs/   (props changed)
  stable/7/usr.bin/kdump/   (props changed)
  stable/7/usr.bin/ktrace/   (props changed)
  stable/7/usr.bin/ldd/   (props changed)
  stable/7/usr.bin/lockf/   (props changed)
  stable/7/usr.bin/logger/   (props changed)
  stable/7/usr.bin/make/   (props changed)
  stable/7/usr.bin/netstat/   (props changed)
  stable/7/usr.bin/netstat/Makefile
  stable/7/usr.bin/netstat/main.c
  stable/7/usr.bin/netstat/netstat.h
  stable/7/usr.bin/nsupdate/   (props changed)
  stable/7/usr.bin/procstat/   (props changed)
  stable/7/usr.bin/sed/   (props changed)
  stable/7/usr.bin/shar/   (props changed)
  stable/7/usr.bin/su/   (props changed)
  stable/7/usr.bin/tar/   (props changed)
  stable/7/usr.bin/top/   (props changed)
  stable/7/usr.bin/truncate/   (props changed)
  stable/7/usr.bin/truss/   (props changed)
  stable/7/usr.bin/units/   (props changed)
  stable/7/usr.bin/vmstat/   (props changed)
  stable/7/usr.bin/whereis/   (props changed)
  stable/7/usr.bin/window/   (props changed)
  stable/7/usr.bin/xargs/   (props changed)

Modified: stable/7/usr.bin/netstat/Makefile
==============================================================================
--- stable/7/usr.bin/netstat/Makefile	Wed Jan 14 18:19:06 2009	(r187228)
+++ stable/7/usr.bin/netstat/Makefile	Wed Jan 14 18:23:13 2009	(r187229)
@@ -5,7 +5,7 @@
 
 PROG=	netstat
 SRCS=	if.c inet.c main.c mbuf.c mcast.c mroute.c route.c \
-	unix.c atalk.c netgraph.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c
+	unix.c atalk.c mroute6.c ipsec.c bpf.c pfkey.c sctp.c
 
 WARNS?=	3
 CFLAGS+=-fno-strict-aliasing
@@ -20,8 +20,15 @@ CFLAGS+=-DINET6
 
 BINGRP=	kmem
 BINMODE=2555
-DPADD=	${LIBKVM} ${LIBMEMSTAT} ${LIBNETGRAPH} ${LIBUTIL}
-LDADD=	-lkvm -lmemstat -lnetgraph -lutil
+DPADD=	${LIBKVM} ${LIBMEMSTAT} ${LIBUTIL}
+LDADD=	-lkvm -lmemstat -lutil
+
+.if ${MK_NETGRAPH_SUPPORT} != "no"
+SRCS+=	netgraph.c
+DPADD+=	${LIBNETGRAPH}
+LDADD+=	-lnetgraph
+CFLAGS+=-DNETGRAPH
+.endif
 
 .if ${MK_IPX_SUPPORT} != "no"
 SRCS+=	ipx.c

Modified: stable/7/usr.bin/netstat/main.c
==============================================================================
--- stable/7/usr.bin/netstat/main.c	Wed Jan 14 18:19:06 2009	(r187228)
+++ stable/7/usr.bin/netstat/main.c	Wed Jan 14 18:23:13 2009	(r187229)
@@ -54,7 +54,9 @@ __FBSDID("$FreeBSD$");
 
 #include <netinet/in.h>
 
+#ifdef NETGRAPH
 #include <netgraph/ng_socket.h>
+#endif
 
 #include <ctype.h>
 #include <err.h>
@@ -272,7 +274,7 @@ struct protox atalkprotox[] = {
 	{ -1,		-1,		0,	NULL,
 	  NULL,		NULL,		NULL,	0,	0 }
 };
-
+#ifdef NETGRAPH
 struct protox netgraphprotox[] = {
 	{ N_NGSOCKS,	-1,		1,	netgraphprotopr,
 	  NULL,		NULL,		"ctrl",	0,	0 },
@@ -281,7 +283,7 @@ struct protox netgraphprotox[] = {
 	{ -1,		-1,		0,	NULL,
 	  NULL,		NULL,		NULL,	0,	0 }
 };
-
+#endif
 #ifdef IPX
 struct protox ipxprotox[] = {
 	{ N_IPX,	N_IPXSTAT,	1,	ipxprotopr,
@@ -383,9 +385,11 @@ main(int argc, char *argv[])
 				af = AF_UNIX;
 			else if (strcmp(optarg, "atalk") == 0)
 				af = AF_APPLETALK;
+#ifdef NETGRAPH
 			else if (strcmp(optarg, "ng") == 0
 			    || strcmp(optarg, "netgraph") == 0)
 				af = AF_NETGRAPH;
+#endif
 			else if (strcmp(optarg, "link") == 0)
 				af = AF_LINK;
 			else {
@@ -580,9 +584,11 @@ main(int argc, char *argv[])
 	if (af == AF_APPLETALK || af == AF_UNSPEC)
 		for (tp = atalkprotox; tp->pr_name; tp++)
 			printproto(tp, tp->pr_name);
+#ifdef NETGRAPH
 	if (af == AF_NETGRAPH || af == AF_UNSPEC)
 		for (tp = netgraphprotox; tp->pr_name; tp++)
 			printproto(tp, tp->pr_name);
+#endif /* NETGRAPH */
 	if ((af == AF_UNIX || af == AF_UNSPEC) && !Lflag && !sflag)
 		unixpr(nl[N_UNP_COUNT].n_value, nl[N_UNP_GENCNT].n_value,
 		    nl[N_UNP_DHEAD].n_value, nl[N_UNP_SHEAD].n_value);

Modified: stable/7/usr.bin/netstat/netstat.h
==============================================================================
--- stable/7/usr.bin/netstat/netstat.h	Wed Jan 14 18:19:06 2009	(r187228)
+++ stable/7/usr.bin/netstat/netstat.h	Wed Jan 14 18:23:13 2009	(r187229)
@@ -144,7 +144,9 @@ void	nserr_stats(u_long, const char *, i
 void	atalkprotopr(u_long, const char *, int, int);
 void	ddp_stats(u_long, const char *, int, int);
 
+#ifdef NETGRAPH
 void	netgraphprotopr(u_long, const char *, int, int);
+#endif
 
 void	unixpr(u_long, u_long, u_long, u_long);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200901141823.n0EINDgS050409>