Bug 729596 - Use ftruncate in szip instead of posix_fallocate. r=taras

This commit is contained in:
Mike Hommey 2012-02-22 19:42:56 +01:00
parent aaf74b5c86
commit 3bf06f8b2d

View File

@ -67,7 +67,7 @@ int main(int argc, char* argv[])
size_t offset = sizeof(SeekableZStreamHeader) + nChunks * sizeof(uint32_t);
/* Give enough room for the header and the offset table, and map them */
ret = posix_fallocate(outFd, 0, offset);
ret = ftruncate(outFd, offset);
MOZ_ASSERT(ret == 0);
MappedPtr headerMap;
headerMap.Assign(mmap(NULL, offset, PROT_READ | PROT_WRITE, MAP_SHARED,