Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 6 Nov 2008 09:41:31 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184712 - head/sys/dev/en
Message-ID:  <200811060941.mA69fV1U051030@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Thu Nov  6 09:41:31 2008
New Revision: 184712
URL: http://svn.freebsd.org/changeset/base/184712

Log:
  Hide an unused variable in case we compile with neither INET nor INET6.
  NATM needs 'struct in_addr' to compile, which is a problem on its own
  but include in.h for now if we have NATM but neither INET or INET6.
  
  MFC after:	2 months

Modified:
  head/sys/dev/en/midway.c

Modified: head/sys/dev/en/midway.c
==============================================================================
--- head/sys/dev/en/midway.c	Thu Nov  6 09:27:47 2008	(r184711)
+++ head/sys/dev/en/midway.c	Thu Nov  6 09:41:31 2008	(r184712)
@@ -141,10 +141,12 @@ enum {
 #include <net/if_media.h>
 #include <net/if_atm.h>
 
-#if defined(INET) || defined(INET6)
+#if defined(NATM) || defined(INET) || defined(INET6)
 #include <netinet/in.h>
+#if defined(INET) || defined(INET6)
 #include <netinet/if_atm.h>
 #endif
+#endif
 
 #ifdef NATM
 #include <netnatm/natm.h>
@@ -1524,7 +1526,9 @@ static int
 en_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
 {
 	struct en_softc *sc = (struct en_softc *)ifp->if_softc;
+#if defined(INET) || defined(INET6)
 	struct ifaddr *ifa = (struct ifaddr *)data;
+#endif
 	struct ifreq *ifr = (struct ifreq *)data;
 	struct atmio_vcctable *vtab;
 	int error = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811060941.mA69fV1U051030>