diff options
-rw-r--r-- | sys/vm/vm_mmap.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c index 2b99e36..c8d25ee 100644 --- a/sys/vm/vm_mmap.c +++ b/sys/vm/vm_mmap.c @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include <sys/mount.h> #include <sys/conf.h> #include <sys/stat.h> +#include <sys/sysent.h> #include <sys/vmmeter.h> #include <sys/sysctl.h> @@ -229,7 +230,8 @@ mmap(td, uap) fp = NULL; /* make sure mapping fits into numeric range etc */ - if (uap->len == 0 || + if ((uap->len == 0 && !SV_CURPROC_FLAG(SV_AOUT) && + curproc->p_osrel >= 800104) || ((flags & MAP_ANON) && uap->fd != -1)) return (EINVAL); |