diff options
author | phk <phk@FreeBSD.org> | 2005-08-05 18:45:49 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2005-08-05 18:45:49 +0000 |
commit | 267e10d4ec0498453975786dcdb3c3c5cd87ddc4 (patch) | |
tree | aed11ef4a458dd0f9111b27e3f7c5c5b041685d2 /usr.bin/netstat | |
parent | 0037d26e49b3f01d1ab949f474eb08d62d78cfc8 (diff) | |
download | FreeBSD-src-267e10d4ec0498453975786dcdb3c3c5cd87ddc4.zip FreeBSD-src-267e10d4ec0498453975786dcdb3c3c5cd87ddc4.tar.gz |
Make IPX support depend on NO_IPX
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/Makefile | 9 | ||||
-rw-r--r-- | usr.bin/netstat/main.c | 9 |
2 files changed, 16 insertions, 2 deletions
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile index 483e8ef..3c3eeeb 100644 --- a/usr.bin/netstat/Makefile +++ b/usr.bin/netstat/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PROG= netstat -SRCS= if.c inet.c inet6.c main.c mbuf.c mcast.c mroute.c ipx.c route.c \ +SRCS= if.c inet.c inet6.c main.c mbuf.c mcast.c mroute.c route.c \ unix.c atalk.c netgraph.c mroute6.c ipsec.c WARNS?= 2 @@ -18,4 +18,11 @@ BINMODE=2555 DPADD= ${LIBKVM} ${LIBIPX} ${LIBMEMSTAT} ${LIBNETGRAPH} ${LIBUTIL} LDADD= -lkvm -lipx -lmemstat -lnetgraph -lutil +.if !defined(NO_IPX) +SRCS+= ipx.c +DPADD+= ${LIBIPX} +LDADD+= -lipx +CFLAGS+=-DIPX +.endif + .include <bsd.prog.mk> diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c index ecdcd01..61a0ec1 100644 --- a/usr.bin/netstat/main.c +++ b/usr.bin/netstat/main.c @@ -235,6 +235,7 @@ struct protox netgraphprotox[] = { NULL, NULL, NULL, 0 } }; +#ifdef IPX struct protox ipxprotox[] = { { N_IPX, N_IPXSTAT, 1, ipxprotopr, ipx_stats, NULL, "ipx", 0 }, @@ -243,6 +244,7 @@ struct protox ipxprotox[] = { { -1, -1, 0, NULL, NULL, NULL, 0, 0 } }; +#endif struct protox *protoprotox[] = { protox, @@ -252,7 +254,10 @@ struct protox *protoprotox[] = { #ifdef IPSEC pfkeyprotox, #endif - ipxprotox, atalkprotox, NULL }; +#ifdef IPX + ipxprotox, +#endif + atalkprotox, NULL }; const char *pluralies(int); static void printproto(struct protox *, const char *); @@ -517,11 +522,13 @@ main(int argc, char *argv[]) for (tp = pfkeyprotox; tp->pr_name; tp++) printproto(tp, tp->pr_name); #endif /*IPSEC*/ +#ifdef IPX if (af == AF_IPX || af == AF_UNSPEC) { kread(0, 0, 0); for (tp = ipxprotox; tp->pr_name; tp++) printproto(tp, tp->pr_name); } +#endif /* IPX */ if (af == AF_APPLETALK || af == AF_UNSPEC) for (tp = atalkprotox; tp->pr_name; tp++) printproto(tp, tp->pr_name); |