Commit 17f7bde2f730723f6edae66b454afba481595bb0

Vicent Marti 2012-08-23T15:47:08

posix: Always set a default mapping mode

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/unix/map.c b/src/unix/map.c
index 9dcae58..ee7888c 100644
--- a/src/unix/map.c
+++ b/src/unix/map.c
@@ -31,6 +31,8 @@ int p_mmap(git_map *out, size_t len, int prot, int flags, int fd, git_off_t offs
 		mflag = MAP_SHARED;
 	else if ((flags & GIT_MAP_TYPE) == GIT_MAP_PRIVATE)
 		mflag = MAP_PRIVATE;
+	else
+		mflag = MAP_SHARED;
 
 	out->data = mmap(NULL, len, mprot, mflag, fd, offset);