Subject: kern/4278: COMPAT_SVR4 doesn't compile
To: None <gnats-bugs@gnats.netbsd.org>
From: Matthias Scheler <tron@lyssa.owl.de>
List: netbsd-bugs
Date: 10/16/1997 16:00:40
>Number:         4278
>Category:       kern
>Synopsis:       COMPAT_SVR4 doesn't compile
>Confidential:   yes
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Oct 16 07:05:02 1997
>Last-Modified:
>Originator:     Matthias Scheler
>Organization:
Matthias Scheler                                http://home.owl.de/~tron/
>Release:        971015
>Environment:
System: NetBSD lyssa 1.2G NetBSD 1.2G (LYSSA) #0: Thu Oct 16 15:36:04 MEST 1997 tron@lyssa:/src/src/sys/arch/i386/compile/LYSSA i386

>Description:
After the recent kernel prototype changes a kernel with "option COMPAT_SVR4"
can't be compiled any more due to invalid pointer assignments in "svr4_misc.c".

>How-To-Repeat:
Configure and compile a kernel with SVR4 compatibility.

>Fix:
*** src/sys/compat/svr4/svr4_misc.c.orig	Sat Oct 11 15:18:45 1997
--- src/sys/compat/svr4/svr4_misc.c	Thu Oct 16 15:33:52 1997
*************** svr4_sys_getrlimit(p, v, retval)
*** 714,720 ****
  		SCARG(uap, which) = RLIMIT_RSS;
  
  	SCARG(&ap, which) = SCARG(uap, which);
! 	SCARG(&ap, rlp) = SCARG(uap, rlp);
  
  	return compat_43_sys_getrlimit(p, &ap, retval);
  }
--- 714,720 ----
  		SCARG(uap, which) = RLIMIT_RSS;
  
  	SCARG(&ap, which) = SCARG(uap, which);
! 	SCARG(&ap, rlp) = (struct orlimit *) SCARG(uap, rlp);
  
  	return compat_43_sys_getrlimit(p, &ap, retval);
  }
*************** svr4_sys_setrlimit(p, v, retval)
*** 738,744 ****
  		SCARG(uap, which) = RLIMIT_RSS;
  
  	SCARG(&ap, which) = SCARG(uap, which);
! 	SCARG(&ap, rlp) = SCARG(uap, rlp);
  
  	return compat_43_sys_setrlimit(p, uap, retval);
  }
--- 738,744 ----
  		SCARG(uap, which) = RLIMIT_RSS;
  
  	SCARG(&ap, which) = SCARG(uap, which);
! 	SCARG(&ap, rlp) = (struct orlimit *) SCARG(uap, rlp);
  
  	return compat_43_sys_setrlimit(p, uap, retval);
  }
>Audit-Trail:
>Unformatted: