Subject: port-amiga/1491: Prototype problems in sunos_machdep.c
To: None <gnats-bugs@gnats.netbsd.org>
From: None <dmaddox@scsn.net>
List: netbsd-bugs
Date: 09/21/1995 19:18:17
>Number:         1491
>Category:       port-amiga
>Synopsis:       Kernel build fails if COMPAT_SUNOS defined.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 21 19:35:00 1995
>Last-Modified:
>Originator:     Donald J. Maddox
>Organization:
>Release:        NetBSD-current 20-Sep-95
>Environment:

System: NetBSD rhiannon.scsn.net 1.0A NetBSD 1.0A (RHIANNON) #49: Mon Sep 18 05:51:28 EDT 1995 dmaddox@rhiannon.scsn.net:/usr/src/sys/arch/amiga/compile/RHIANNON amiga
Architecture: amiga

>Description:

Error from build of this yesterday's sup:

../../../../arch/m68k/m68k/sunos_machdep.c:In function 'sunos_sigreturn':
../../../../arch/m68k/m68k/sunos_machdep.c:226:argument `uap' doesn't 
match prototype
../../../../compat/sunos/sunos_syscallargs.h:315:prototype declaration
*** Error code 1

Stop.

>How-To-Repeat:
Try to build a kernel with COMPAT_SUNOS defined.

>Fix:

Here's one way:

*** sunos_machdep.c.orig	Sat Sep  2 03:07:54 1995
--- sunos_machdep.c	Thu Sep 21 17:36:33 1995
***************
*** 221,234 ****
  int
  sunos_sigreturn(p, uap, retval)
  	struct proc *p;
! 	struct sunos_sigreturn_args *uap;
  	register_t *retval;
  {
  	register struct sunos_sigcontext *scp;
  	register struct frame *frame;
  	struct sunos_sigcontext tsigc;
  
! 	scp = (struct sunos_sigcontext *) SCARG(uap, sigcntxp);
  #ifdef DEBUG
  	if (sigdebug & SDB_FOLLOW)
  		printf("sunos_sigreturn: pid %d, scp %x\n", p->p_pid, scp);
--- 221,234 ----
  int
  sunos_sigreturn(p, uap, retval)
  	struct proc *p;
! 	void *uap;
  	register_t *retval;
  {
  	register struct sunos_sigcontext *scp;
  	register struct frame *frame;
  	struct sunos_sigcontext tsigc;
  
! 	scp = (struct sunos_sigcontext *) SCARG((struct sunos_sigreturn_args *)uap, sigcntxp);
  #ifdef DEBUG
  	if (sigdebug & SDB_FOLLOW)
  		printf("sunos_sigreturn: pid %d, scp %x\n", p->p_pid, scp);

>Audit-Trail:
>Unformatted: