aboutsummaryrefslogtreecommitdiff
path: root/bsd-user/bsd-mem.h
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-user/bsd-mem.h')
-rw-r--r--bsd-user/bsd-mem.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/bsd-user/bsd-mem.h b/bsd-user/bsd-mem.h
index eef6b22..1be906c 100644
--- a/bsd-user/bsd-mem.h
+++ b/bsd-user/bsd-mem.h
@@ -56,7 +56,9 @@
#include <fcntl.h>
#include "qemu-bsd.h"
+#include "exec/mmap-lock.h"
#include "exec/page-protection.h"
+#include "user/page-protection.h"
extern struct bsd_shm_regions bsd_shm_regions[];
extern abi_ulong target_brk;
@@ -369,9 +371,11 @@ static inline abi_long do_bsd_shmat(int shmid, abi_ulong shmaddr, int shmflg)
if (shmaddr) {
host_raddr = shmat(shmid, (void *)g2h_untagged(shmaddr), shmflg);
} else {
+ abi_ulong alignment;
abi_ulong mmap_start;
- mmap_start = mmap_find_vma(0, shm_info.shm_segsz);
+ alignment = 0; /* alignment above page size not required */
+ mmap_start = mmap_find_vma(0, shm_info.shm_segsz, alignment);
if (mmap_start == -1) {
return -TARGET_ENOMEM;