Index: uspace/lib/posix/src/sys/mman.c
===================================================================
--- uspace/lib/posix/src/sys/mman.c	(revision 9b8be79e64f6d9051bd3e81c8c2f91ff32bb499f)
+++ uspace/lib/posix/src/sys/mman.c	(revision 3bdcf57c425c8d04e7048fea36599f5121f55ceb)
@@ -39,4 +39,20 @@
 #include <unistd.h>
 
+static int _prot_to_as(int prot)
+{
+	int ret = 0;
+
+	if (prot & PROT_READ)
+		ret |= AS_AREA_READ;
+
+	if (prot & PROT_WRITE)
+		ret |= AS_AREA_WRITE;
+
+	if (prot & PROT_EXEC)
+		ret |= AS_AREA_EXEC;
+
+	return ret;
+}
+
 void *mmap(void *start, size_t length, int prot, int flags, int fd,
     off_t offset)
@@ -53,5 +69,5 @@
 		return MAP_FAILED;
 
-	return as_area_create(start, length, prot, AS_AREA_UNPAGED);
+	return as_area_create(start, length, _prot_to_as(prot), AS_AREA_UNPAGED);
 }
 
