Index: head/sys/amd64/amd64/trap.c =================================================================== --- head/sys/amd64/amd64/trap.c +++ head/sys/amd64/amd64/trap.c @@ -95,6 +95,7 @@ #include #endif #include +#include #include #ifdef KDTRACE_HOOKS @@ -338,14 +339,14 @@ ucode = SEGV_ACCERR; } else { signo = SIGBUS; - ucode = BUS_PAGE_FAULT; + ucode = T_PAGEFLT; } } else if (prot_fault_translation == 1) { /* * Always compat mode. */ signo = SIGBUS; - ucode = BUS_PAGE_FAULT; + ucode = T_PAGEFLT; } else { /* * Always SIGSEGV mode. Index: head/sys/amd64/ia32/ia32_signal.c =================================================================== --- head/sys/amd64/ia32/ia32_signal.c +++ head/sys/amd64/ia32/ia32_signal.c @@ -82,6 +82,7 @@ #include #include #include +#include #ifdef COMPAT_FREEBSD4 static void freebsd4_ia32_sendsig(sig_t, ksiginfo_t *, sigset_t *); Index: head/sys/amd64/linux/linux_sysvec.c =================================================================== --- head/sys/amd64/linux/linux_sysvec.c +++ head/sys/amd64/linux/linux_sysvec.c @@ -72,6 +72,7 @@ #include #include #include +#include #include #include Index: head/sys/amd64/linux32/linux32_sysvec.c =================================================================== --- head/sys/amd64/linux32/linux32_sysvec.c +++ head/sys/amd64/linux32/linux32_sysvec.c @@ -75,6 +75,7 @@ #include #include #include +#include #include #include Index: head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c =================================================================== --- head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c +++ head/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c @@ -52,6 +52,7 @@ #include #include #include +#include #endif #include #ifdef illumos Index: head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c =================================================================== --- head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c +++ head/sys/cddl/dev/dtrace/amd64/dtrace_subr.c @@ -44,6 +44,7 @@ #include #include #include +#include #include extern void dtrace_getnanotime(struct timespec *tsp); Index: head/sys/cddl/dev/dtrace/i386/dtrace_subr.c =================================================================== --- head/sys/cddl/dev/dtrace/i386/dtrace_subr.c +++ head/sys/cddl/dev/dtrace/i386/dtrace_subr.c @@ -45,6 +45,7 @@ #include #include #include +#include #include extern uintptr_t kernelbase; Index: head/sys/i386/i386/trap.c =================================================================== --- head/sys/i386/i386/trap.c +++ head/sys/i386/i386/trap.c @@ -97,6 +97,7 @@ #include #endif #include +#include #include #include @@ -416,14 +417,14 @@ ucode = SEGV_ACCERR; } else { signo = SIGBUS; - ucode = BUS_PAGE_FAULT; + ucode = T_PAGEFLT; } } else if (prot_fault_translation == 1) { /* * Always compat mode. */ signo = SIGBUS; - ucode = BUS_PAGE_FAULT; + ucode = T_PAGEFLT; } else { /* * Always SIGSEGV mode. Index: head/sys/i386/linux/linux_sysvec.c =================================================================== --- head/sys/i386/linux/linux_sysvec.c +++ head/sys/i386/linux/linux_sysvec.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #include Index: head/sys/x86/include/signal.h =================================================================== --- head/sys/x86/include/signal.h +++ head/sys/x86/include/signal.h @@ -43,10 +43,6 @@ #include #include -#if __BSD_VISIBLE -#include /* codes for SIGILL, SIGFPE */ -#endif - #ifdef __i386__ typedef int sig_atomic_t; Index: head/sys/x86/include/trap.h =================================================================== --- head/sys/x86/include/trap.h +++ head/sys/x86/include/trap.h @@ -66,30 +66,6 @@ #define T_RESERVED 30 /* reserved (unknown) */ #define T_DTRACE_RET 32 /* DTrace pid return */ -/* XXX most of the following codes aren't used, but could be. */ - -/* definitions for */ -#define ILL_RESAD_FAULT T_RESADFLT -#define ILL_PRIVIN_FAULT T_PRIVINFLT -#define ILL_RESOP_FAULT T_RESOPFLT -#define ILL_ALIGN_FAULT T_ALIGNFLT -#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */ - -/* old FreeBSD macros, deprecated */ -#define FPE_INTOVF_TRAP 0x1 /* integer overflow */ -#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */ -#define FPE_FLTDIV_TRAP 0x3 /* floating/decimal divide by zero */ -#define FPE_FLTOVF_TRAP 0x4 /* floating overflow */ -#define FPE_FLTUND_TRAP 0x5 /* floating underflow */ -#define FPE_FPU_NP_TRAP 0x6 /* floating point unit not present */ -#define FPE_SUBRNG_TRAP 0x7 /* subrange out of bounds */ - -/* codes for SIGBUS */ -#define BUS_PAGE_FAULT T_PAGEFLT /* page fault protection base */ -#define BUS_SEGNP_FAULT T_SEGNPFLT /* segment not present */ -#define BUS_STK_FAULT T_STKFLT /* stack segment */ -#define BUS_SEGM_FAULT T_RESERVED /* segment protection base */ - /* Trap's coming from user mode */ #define T_USER 0x100