summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2012-05-09 21:25:34 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2012-05-09 21:25:34 +0000
commit49978a644d7c5f8f94165edba0313f1b58ff60fe (patch)
treeeea5b9ce7833546e88b76200e2de2f52fda6fa7b
parented31cfa210a3458e2dad33838e45cf09377fa343 (diff)
Do not include <machine/reg.h> and pollute userland namespace with struct reg
in <machine/signal.h>.
-rw-r--r--sys/arch/m88k/include/signal.h5
-rw-r--r--sys/arch/m88k/m88k/sig_machdep.c5
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/arch/m88k/include/signal.h b/sys/arch/m88k/include/signal.h
index ef4dfed462b..2303835c934 100644
--- a/sys/arch/m88k/include/signal.h
+++ b/sys/arch/m88k/include/signal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: signal.h,v 1.5 2011/03/23 16:54:35 pirofti Exp $ */
+/* $OpenBSD: signal.h,v 1.6 2012/05/09 21:25:33 miod Exp $ */
/*
* Copyright (c) 1996 Nivas Madhur
* All rights reserved.
@@ -38,7 +38,6 @@
typedef int sig_atomic_t;
#if __BSD_VISIBLE || __XPG_VISIBLE >= 420
-#include <machine/reg.h>
/*
* Information pushed on stack when a signal is delivered.
@@ -53,7 +52,7 @@ struct sigcontext {
int sc_onstack; /* sigstack state to restore */
int sc_mask; /* signal mask to restore */
/* begin machine dependent portion */
- struct reg sc_regs;
+ unsigned int sc_regs[32 + 25];
};
#endif /* __BSD_VISIBLE || __XPG_VISIBLE >= 420 */
#endif /* _M88K_SIGNAL_H_ */
diff --git a/sys/arch/m88k/m88k/sig_machdep.c b/sys/arch/m88k/m88k/sig_machdep.c
index 4e3e88b2f91..7841cec5ad3 100644
--- a/sys/arch/m88k/m88k/sig_machdep.c
+++ b/sys/arch/m88k/m88k/sig_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sig_machdep.c,v 1.13 2011/07/05 04:48:01 guenther Exp $ */
+/* $OpenBSD: sig_machdep.c,v 1.14 2012/05/09 21:25:33 miod Exp $ */
/*
* Copyright (c) 1998, 1999, 2000, 2001 Steve Murphree, Jr.
* Copyright (c) 1996 Nivas Madhur
@@ -212,7 +212,8 @@ sys_sigreturn(struct proc *p, void *v, register_t *retval)
tf = p->p_md.md_tf;
scp = &ksc;
- if ((scp->sc_regs.epsr ^ tf->tf_regs.epsr) & PSR_USERSTATIC)
+ if ((((struct reg *)&scp->sc_regs)->epsr ^ tf->tf_regs.epsr) &
+ PSR_USERSTATIC)
return (EINVAL);
bcopy((const void *)&scp->sc_regs, (caddr_t)&tf->tf_regs,