aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bsd-user/mmap.c2
-rw-r--r--darwin-user/mmap.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index ff207cd55..139cd3f44 100644
--- a/bsd-user/mmap.c
+++ b/bsd-user/mmap.c
@@ -240,7 +240,7 @@ static int mmap_frag(abi_ulong real_start,
possible while it is a shared mapping */
if ((flags & TARGET_BSD_MAP_FLAGMASK) == MAP_SHARED &&
(prot & PROT_WRITE))
- return -EINVAL;
+ return -1;
/* adjust protection to be able to read */
if (!(prot1 & PROT_WRITE))
diff --git a/darwin-user/mmap.c b/darwin-user/mmap.c
index 8ba61fb97..d840b28d3 100644
--- a/darwin-user/mmap.c
+++ b/darwin-user/mmap.c
@@ -129,7 +129,7 @@ int mmap_frag(unsigned long host_start,
if ((flags & MAP_SHARED) &&
#endif
(prot & PROT_WRITE))
- return -EINVAL;
+ return -1;
/* adjust protection to be able to read */
if (!(prot1 & PROT_WRITE))