diff options
Diffstat (limited to 'sys/i386/ibcs2/ibcs2_util.h')
-rw-r--r-- | sys/i386/ibcs2/ibcs2_util.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/i386/ibcs2/ibcs2_util.h b/sys/i386/ibcs2/ibcs2_util.h index 67f859b..af972b6 100644 --- a/sys/i386/ibcs2/ibcs2_util.h +++ b/sys/i386/ibcs2/ibcs2_util.h @@ -45,6 +45,8 @@ #include <machine/vmparam.h> #include <sys/exec.h> #include <sys/cdefs.h> +#include <sys/sysent.h> +#include <sys/proc.h> #ifndef SCARG #define SCARG(p, x) (p)->x @@ -56,8 +58,8 @@ static __inline void *stackgap_alloc(caddr_t *, size_t); static __inline caddr_t stackgap_init() { -#define szsigcode ((caddr_t)(esigcode - sigcode)) - return (caddr_t)(ALIGN(((caddr_t)PS_STRINGS) - SPARE_USRSPACE)); +#define szsigcode (*(curproc->p_sysent->sv_szsigcode), sizeof(char *)) + return (caddr_t)(((caddr_t)PS_STRINGS) - szsigcode - SPARE_USRSPACE); } |