diff options
author | Marcel Moolenaar <marcel@FreeBSD.org> | 2011-10-13 18:18:42 +0000 |
---|---|---|
committer | Marcel Moolenaar <marcel@FreeBSD.org> | 2011-10-13 18:18:42 +0000 |
commit | 488a16050c4d63b8960d38fb9b3ae91dcb70e741 (patch) | |
tree | 928eb836f8fbc04c066eb7149ea20468425054ff /sys/compat/freebsd32/freebsd32_misc.c | |
parent | a7978bab761dfa898b024b5734a3cd5727873c29 (diff) | |
download | src-488a16050c4d63b8960d38fb9b3ae91dcb70e741.tar.gz src-488a16050c4d63b8960d38fb9b3ae91dcb70e741.zip |
In freebsd32_mmap() and when compiling for amd64 or ia64, also
ask for execute permissions when read permissions are wanted.
This is needed for JDK 1.4.x on i386.
Notes
Notes:
svn path=/head/; revision=226347
Diffstat (limited to 'sys/compat/freebsd32/freebsd32_misc.c')
-rw-r--r-- | sys/compat/freebsd32/freebsd32_misc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index 6d28715cea4f..ae80ef2a22c8 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -520,6 +520,11 @@ freebsd32_mmap(struct thread *td, struct freebsd32_mmap_args *uap) } #endif +#if defined(__amd64__) || defined(__ia64__) + if (prot & PROT_READ) + prot |= PROT_EXEC; +#endif + ap.addr = (void *) addr; ap.len = len; ap.prot = prot; |