Subject: kern/2102: sys/net/if.c won't compile without COMPAT_43
To: None <gnats-bugs@NetBSD.ORG>
From: Luke Mewburn <lukem@supp.cpr.itg.telecom.com.au>
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
>Last-Modified:
>Originator: Luke Mewburn
>Organization:
Infinite Spare Time
>Release: NetBSD-960219
>Environment:
System: NetBSD shelob.supp.cpr.itg.telecom.com.au 1.1A NetBSD 1.1A (SHELOB) #0: Wed Feb 14 10:52:38 EST 1996 lukem@shelob.supp.cpr.itg.telecom.com.au:/z/src/sys/arch/i386/compile/SHELOB i386
>Description:
/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
>How-To-Repeat:
don't define COMPAT_43.
config KERNEL_NAME
cd ../../compile/KERNEL_NAME
make clean netbsd
>Fix:
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));
#else
{
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));
#else
{
int ocmd = cmd;
>Audit-Trail:
>Unformatted: