commit 76f5ec3
Michael Forney
·
2014-01-14 09:55:13 +0000 UTC
parent 060c033
wayland-shm: Use posix_fallocate instead of ftruncate
1 files changed,
+1,
-1
+1,
-1
1@@ -171,7 +171,7 @@ struct wld_buffer * context_create_buffer(struct wld_context * base,
2
3 unlink(name);
4
5- if (ftruncate(fd, size) < 0)
6+ if (posix_fallocate(fd, 0, size) != 0)
7 goto error1;
8
9 object.ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);