Subject: kern/3444: if_ethersubr compilation warnings without INET
To: None <gnats-bugs@gnats.netbsd.org>
From: Erik Bertelsen <erik@erik-be.uni-c.dk>
List: netbsd-bugs
Date: 04/03/1997 15:02:53
>Number:         3444
>Category:       kern
>Synopsis:       if_ethersubr compilation warnings without INET
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr  3 03:05:02 1997
>Last-Modified:
>Originator:     Erik Bertelsen
>Organization:
	
>Release:        NetBSD-current 2 Apr 1997
>Environment:
	
System: NetBSD erik-be.uni-c.dk 1.2D NetBSD 1.2D (ERIKBE) #20: Thu Apr 3 13:15:27 MEST 1997 erik@erik-be.uni-c.dk:/sw/NetBSD/src/sys/arch/i386/compile/ERIKBE i386


>Description:
	Compiling a kernel without options INET cause compilation warnings
	in net/if_ethersubr.c caused by a few unused variables.
>How-To-Repeat:
	
>Fix:
Index: if_ethersubr.c
===================================================================
RCS file: /sw/cvs-base/src/sys/net/if_ethersubr.c,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 if_ethersubr.c
*** if_ethersubr.c      1997/03/16 16:18:56     1.1.1.2
--- if_ethersubr.c      1997/04/03 12:50:31
***************
*** 108,114 ****
--- 108,116 ----
        register struct rtentry *rt;
        struct mbuf *mcopy = (struct mbuf *)0;
        register struct ether_header *eh;
+ #ifdef INET
        struct arphdr *ah;
+ #endif
  
        if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
                senderr(ENETDOWN);
***************
*** 564,570 ****
--- 566,574 ----
        register struct ethercom *ec;
  {
        register struct ether_multi *enm;
+ #ifdef INET
        struct sockaddr_in *sin;
+ #endif
        u_char addrlo[6];
        u_char addrhi[6];
        int s = splimp();
***************
*** 651,657 ****
--- 655,663 ----
        register struct ethercom *ec;
  {
        register struct ether_multi *enm;
+ #ifdef INET
        struct sockaddr_in *sin;
+ #endif
        u_char addrlo[6];
        u_char addrhi[6];
        int s = splimp();


- Regards
Erik Bertelsen
>Audit-Trail:
>Unformatted: