Subject: kern/19941: [rkb] post-SA-merge compat/svr4_32 doesn't build on sparc64
To: None <gnats-bugs@gnats.netbsd.org>
From: None <rafal@netbsd.org>
List: netbsd-bugs
Date: 01/19/2003 23:21:52
>Number:         19941
>Category:       kern
>Synopsis:       post-SA-merge compat/svr4_32 doesn't build on sparc64
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 19 20:22:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Rafal Boni
>Release:        NetBSD 1.6M
>Organization:
none
>Environment:
System: NetBSD fearless-vampire-killer.waterside.net 1.6M NetBSD 1.6M (FEARLESS_VAMPIRE_KILLER) #2: Sun Jan 19 23:11:08 EST 2003 rafal@fearless-vampire-killer.waterside.net:/extra/src-current/sys/arch/sparc64/compile/FEARLESS_VAMPIRE_KILLER sparc64
Architecture: sparc64
Machine: sparc64
>Description:
	compat/svr4_32/svr4_32_lwp.c doesn't build due to type mismatches
	("compat_32 pointer" aka int being assinged to pointer).  The error
	is in svr4_32_sys__lwp_wait on line 168.

>How-To-Repeat:
	Build sparc64 kernel with 32-bit SVR4 compat.
>Fix:

Index: svr4_32_lwp.c
===================================================================
RCS file: /cvsroot/src/sys/compat/svr4_32/svr4_32_lwp.c,v
retrieving revision 1.4
diff -u -r1.4 svr4_32_lwp.c
--- svr4_32_lwp.c	2003/01/19 16:47:14	1.4
+++ svr4_32_lwp.c	2003/01/20 04:16:57
@@ -165,7 +165,7 @@
 	struct sys__lwp_wait_args ap;
 
 	SCARG(&ap, wait_for) = SCARG(uap, wait_for);
-	SCARG(&ap, departed) = SCARG(uap, departed_lwp);
+	SCARG(&ap, departed) = (lwpid_t *)(u_long)SCARG(uap, departed_lwp);
 
 	return sys__lwp_wait(l, &ap, retval);
 }
>Release-Note:
>Audit-Trail:
>Unformatted:
 		sources updated ~ 6pm EST