Browse Source

ignore EINVAL error for ftruncate on /dev/zero

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@768 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 11 years ago
parent
commit
1ef6c24da0
  1. 2
      mmap.c

2
mmap.c

@ -187,7 +187,7 @@ static XC_SHM_INIT(xc_mmap_init) /* {{{ */
}
}
if (ftruncate(fd, size) != 0) {
if (ftruncate(fd, size) != 0 && errno != EINVAL) {
perror(shm->name);
errstr = "Failed to ftruncate the file";
goto err;

Loading…
Cancel
Save