]> The Tcpdump Group git mirrors - tcpdump/blobdiff - addrtoname.c
Don't bother including <netinet/if_ether.h> if we're not using
[tcpdump] / addrtoname.c
index 417488ded798e371cf5bca0408a3fce7bae6ca40..cb754434c45d3a4a56b3cf4f0360a14f09ed5ee7 100644 (file)
@@ -23,7 +23,7 @@
  */
 #ifndef lint
 static const char rcsid[] =
-    "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.87 2002-05-31 09:51:13 itojun Exp $ (LBL)";
+    "@(#) $Header: /tcpdump/master/tcpdump/addrtoname.c,v 1.88 2002-06-02 00:07:36 guy Exp $ (LBL)";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -34,14 +34,16 @@ static const char rcsid[] =
 #include <sys/socket.h>
 #include <sys/time.h>
 
-struct mbuf;
-struct rtentry;
-#include <net/if.h>
-
 #include <netinet/in.h>
+
+#ifdef USE_ETHER_NTOHOST
 #ifdef HAVE_NETINET_IF_ETHER_H
+struct mbuf;           /* Squelch compiler warnings on some platforms for */
+struct rtentry;                /* declarations in <net/if.h> */
+#include <net/if.h>    /* for "struct ifnet" in "struct arpcom" on Solaris */
 #include <netinet/if_ether.h>
-#endif
+#endif /* HAVE_NETINET_IF_ETHER_H */
+#endif /* USE_ETHER_NTOHOST */
 
 #include <arpa/inet.h>