diff --git a/linux-user/mmap.c b/linux-user/mmap.c index c1c7e4858..25fc0b295 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -243,7 +243,7 @@ static int mmap_frag(abi_ulong real_start, possible while it is a shared mapping */ if ((flags & MAP_TYPE) == MAP_SHARED && (prot & PROT_WRITE)) - return -EINVAL; + return -1; /* adjust protection to be able to read */ if (!(prot1 & PROT_WRITE))