From 55dba26a626d8c1367616af8f643afc6cb98a367 Mon Sep 17 00:00:00 2001 From: guy Date: Tue, 9 Apr 2002 07:41:19 +0000 Subject: Indicate why we have incomplete definitions for "struct mbuf" and "struct rtentry" (in on some systems, e.g. Digital UNIX 4.0, there are prototypes for kernel functions that include "struct mbuf *" and "struct rtentry *" arguments, and they are included even if you're just user-mode code). We don't need to include unless we have "ether_hostton()", and we don't need to include unless we're including , and we don't need to define "struct mbuf" or "struct rtentry" unless we're including . --- nametoaddr.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'nametoaddr.c') diff --git a/nametoaddr.c b/nametoaddr.c index 32b394d..d699c87 100644 --- a/nametoaddr.c +++ b/nametoaddr.c @@ -24,7 +24,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.62 2002-04-07 00:22:30 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.63 2002-04-09 07:41:19 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -36,13 +36,15 @@ static const char rcsid[] = #include #include -struct mbuf; -struct rtentry; -#include #include +#ifdef HAVE_ETHER_HOSTTON #ifdef HAVE_NETINET_IF_ETHER_H +struct mbuf; /* Squelch compiler warnings on some platforms for */ +struct rtentry; /* declarations in */ +#include /* for "struct ifnet" in "struct arpcom" on Solaris */ #include -#endif +#endif /* HAVE_NETINET_IF_ETHER_H */ +#endif /* HAVE_ETHER_HOSTTON */ #include #include -- cgit v1.2.3