Subject: kern/2102: sys/net/if.c won't compile without COMPAT_43
To: None <gnats-bugs@NetBSD.ORG>
From: Luke Mewburn <>
List: netbsd-bugs
Date: 02/20/1996 09:12:45
>Number:         2102
>Category:       kern
>Synopsis:       sys/net/if.c won't compile without COMPAT_43
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   lm
>Arrival-Date:   Tue Feb 20 22:50:07 1996
>Originator:     Luke Mewburn
		Infinite Spare Time
>Release:        NetBSD-960219
System: NetBSD 1.1A NetBSD 1.1A (SHELOB) #0: Wed Feb 14 10:52:38 EST 1996 i386

	/sys/net/if.c bombs out with the following if COMPAT_43 isn't
	set. I suspect it's just a prototype that was missed since
	almost everyone has COMPAT_43 by default.

../../../../net/if.c: In function `ifioctl':
../../../../net/if.c:512: warning: passing arg 3 makes pointer from integer without a cast
../../../../net/if.c:512: warning: passing arg 4 from incompatible pointer type
../../../../net/if.c:512: warning: passing arg 5 from incompatible pointer type
*** Error code 1

	don't define COMPAT_43.
	cd ../../compile/KERNEL_NAME
	make clean netbsd

	Apply this patch. It just duplicates the argument casting to
	(*so->so_proto->pr_usrreq) that the COMPAT_43 section of the
	code does about 40 lines later. I hope it's correct.

*** /ftp/pub/NetBSD/NetBSD-current/src/sys/net/if.c	Wed Feb 14 23:36:00 1996
--- /sys/net/if.c	Tue Feb 20 08:55:02 1996
*** 509,515 ****
  			return (EOPNOTSUPP);
  #ifndef COMPAT_43
  		return ((*so->so_proto->pr_usrreq)(so, PRU_CONTROL,
! 			cmd, data, ifp));
  		int ocmd = cmd;
--- 509,517 ----
  			return (EOPNOTSUPP);
  #ifndef COMPAT_43
  		return ((*so->so_proto->pr_usrreq)(so, PRU_CONTROL,
! 						    (struct mbuf *) cmd,
! 						    (struct mbuf *) data,
! 						    (struct mbuf *) ifp));
  		int ocmd = cmd;