1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

Make IPX support depend on NO_IPX

This commit is contained in:
Poul-Henning Kamp 2005-08-05 18:45:49 +00:00
parent 9396c1b2d1
commit 9cc22e5c89
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148744
2 changed files with 16 additions and 2 deletions

View File

@ -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>

View File

@ -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);