1
0
Fork 0

ignore EINVAL error for ftruncate on /dev/zero

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@768 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
This commit is contained in:
Xuefer 2011-04-18 07:19:02 +00:00
parent fcf274966f
commit 1ef6c24da0
1 changed files with 1 additions and 1 deletions

2
mmap.c
View File

@ -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;