diff options
| author | Michael Tuexen <tuexen@FreeBSD.org> | 2012-07-19 09:32:59 +0000 |
|---|---|---|
| committer | Michael Tuexen <tuexen@FreeBSD.org> | 2012-07-19 09:32:59 +0000 |
| commit | f0cd2ad5f77c0b94acaca9e47020854172d39782 (patch) | |
| tree | f3e1da233bf1dc217144288d22814ae492fe136f /usr.bin/netstat | |
| parent | 60b4c097032b2729ceed4b1ea22ef14737f32e3a (diff) | |
Notes
Diffstat (limited to 'usr.bin/netstat')
| -rw-r--r-- | usr.bin/netstat/Makefile | 4 | ||||
| -rw-r--r-- | usr.bin/netstat/sctp.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile index ce5cdab4c2b3..1071f0e97a24 100644 --- a/usr.bin/netstat/Makefile +++ b/usr.bin/netstat/Makefile @@ -13,6 +13,10 @@ CFLAGS+=-fno-strict-aliasing CFLAGS+=-DIPSEC CFLAGS+=-DSCTP +.if ${MK_INET_SUPPORT} != "no" +CFLAGS+=-DINET +.endif + .if ${MK_INET6_SUPPORT} != "no" SRCS+= inet6.c CFLAGS+=-DINET6 diff --git a/usr.bin/netstat/sctp.c b/usr.bin/netstat/sctp.c index 0522d7d266e7..b9155e143578 100644 --- a/usr.bin/netstat/sctp.c +++ b/usr.bin/netstat/sctp.c @@ -107,6 +107,7 @@ struct xraddr_entry { * If numeric_addr has been supplied, give * numeric value, otherwise try for symbolic name. */ +#ifdef INET static char * inetname(struct in_addr *inp) { @@ -146,6 +147,7 @@ inetname(struct in_addr *inp) } return (line); } +#endif #ifdef INET6 static char ntop_buf[INET6_ADDRSTRLEN]; @@ -197,9 +199,11 @@ sctp_print_address(union sctp_sockstore *address, int port, int num_port) int width; switch (address->sa.sa_family) { +#ifdef INET case AF_INET: sprintf(line, "%.*s.", Wflag ? 39 : 16, inetname(&address->sin.sin_addr)); break; +#endif #ifdef INET6 case AF_INET6: sprintf(line, "%.*s.", Wflag ? 39 : 16, inet6name(&address->sin6.sin6_addr)); |
