diff options
Diffstat (limited to 'sys/vm/vm_unix.c')
-rw-r--r-- | sys/vm/vm_unix.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/vm/vm_unix.c b/sys/vm/vm_unix.c index 10d6d85c2158..58e14b16c93f 100644 --- a/sys/vm/vm_unix.c +++ b/sys/vm/vm_unix.c @@ -55,6 +55,9 @@ __FBSDID("$FreeBSD$"); #include <sys/sysent.h> #include <sys/sysproto.h> #include <sys/systm.h> +#if defined(__amd64__) || defined(__i386__) /* for i386_read_exec */ +#include <machine/md_var.h> +#endif #include <vm/vm.h> #include <vm/vm_param.h> @@ -177,12 +180,10 @@ kern_break(struct thread *td, uintptr_t *addr) } #endif prot = VM_PROT_RW; -#ifdef COMPAT_FREEBSD32 -#if defined(__amd64__) +#if (defined(COMPAT_FREEBSD32) && defined(__amd64__)) || defined(__i386__) if (i386_read_exec && SV_PROC_FLAG(td->td_proc, SV_ILP32)) prot |= VM_PROT_EXECUTE; #endif -#endif rv = vm_map_insert(map, NULL, 0, old, new, prot, VM_PROT_ALL, 0); if (rv != KERN_SUCCESS) { #ifdef RACCT |