summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2011-05-02 14:48:48 -0400
committerKristian Høgsberg <krh@bitplanet.net>2011-05-02 14:48:48 -0400
commit92d61f13b980e4ecc16724e2b0d823dd4f9a820b (patch)
tree0512f3f43add5bde8721cdbce7f458d675637876
parent761af3ab0a86dbb2a77446270774faf5f91e3752 (diff)
mmap shm buffers read/write
-rw-r--r--wayland/wayland-shm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/wayland/wayland-shm.c b/wayland/wayland-shm.c
index ccdae1c..5f46293 100644
--- a/wayland/wayland-shm.c
+++ b/wayland/wayland-shm.c
@@ -140,7 +140,8 @@ shm_create_buffer(struct wl_client *client, struct wl_shm *shm,
return;
}
- data = mmap(NULL, stride * height, PROT_READ, MAP_SHARED, fd, 0);
+ data = mmap(NULL, stride * height,
+ PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
close(fd);
if (data == MAP_FAILED) {