bsd/darwin-user: mmap_frag() users only check for -1 error

See also ee636500d6eab44b83f09cb730b67226b70423b1.

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index ff207cd..139cd3f 100644
--- a/bsd-user/mmap.c
+++ b/bsd-user/mmap.c
@@ -240,7 +240,7 @@
            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 8ba61fb..d840b28 100644
--- a/darwin-user/mmap.c
+++ b/darwin-user/mmap.c
@@ -129,7 +129,7 @@
         if ((flags &  MAP_SHARED) &&
 #endif
             (prot & PROT_WRITE))
-            return -EINVAL;
+            return -1;
 
         /* adjust protection to be able to read */
         if (!(prot1 & PROT_WRITE))