From 3bf06f8b2da7bb1d318101ae2ea98b94f21ff58e Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Wed, 22 Feb 2012 19:42:56 +0100 Subject: [PATCH] Bug 729596 - Use ftruncate in szip instead of posix_fallocate. r=taras --- mozglue/linker/szip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozglue/linker/szip.cpp b/mozglue/linker/szip.cpp index 213a353381c..1230887ad15 100644 --- a/mozglue/linker/szip.cpp +++ b/mozglue/linker/szip.cpp @@ -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,