diff options
Diffstat (limited to 'sys/compat/sunos')
-rw-r--r-- | sys/compat/sunos/sunos_misc.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sys/compat/sunos/sunos_misc.c b/sys/compat/sunos/sunos_misc.c index a05365a238c..5f509ad15b4 100644 --- a/sys/compat/sunos/sunos_misc.c +++ b/sys/compat/sunos/sunos_misc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sunos_misc.c,v 1.9 1997/01/15 23:00:00 kstailey Exp $ */ +/* $OpenBSD: sunos_misc.c,v 1.10 1997/06/17 11:11:11 deraadt Exp $ */ /* $NetBSD: sunos_misc.c,v 1.65 1996/04/22 01:44:31 christos Exp $ */ /* @@ -182,12 +182,22 @@ sunos_sys_execve(p, v, retval) void *v; register_t *retval; { - struct sunos_sys_execve_args *uap = v; - - caddr_t sg = stackgap_init(p->p_emul); + struct sunos_sys_execve_args /* { + syscallarg(char *) path; + syscallarg(char **) argv; + syscallarg(char **) envp; + } */ *uap = v; + struct sys_execve_args ap; + caddr_t sg; + + sg = stackgap_init(p->p_emul); SUNOS_CHECK_ALT_EXIST(p, &sg, SCARG(uap, path)); - return (sys_execve(p, (struct sys_execve_args *)&uap, retval)); + SCARG(&ap, path) = SCARG(uap, path); + SCARG(&ap, argp) = SCARG(uap, argp); + SCARG(&ap, envp) = SCARG(uap, envp); + + return (sys_execve(p, &ap, retval)); } int |