Index: /trunk/mmap.c
===================================================================
--- /trunk/mmap.c	(revision 767)
+++ /trunk/mmap.c	(revision 768)
@@ -188,5 +188,5 @@
 	}
 
-	if (ftruncate(fd, size) != 0) {
+	if (ftruncate(fd, size) != 0 && errno != EINVAL) {
 		perror(shm->name);
 		errstr = "Failed to ftruncate the file";
