diff --git a/src/AbstractDiskWriter.cc b/src/AbstractDiskWriter.cc index 0d1e014a..e3ce6d6b 100644 --- a/src/AbstractDiskWriter.cc +++ b/src/AbstractDiskWriter.cc @@ -380,7 +380,7 @@ void AbstractDiskWriter::ensureMmapWrite(size_t len, int64_t offset) } #else // !__MINGW32__ mapaddr_ = reinterpret_cast - (mmap(nullptr, size(), PROT_READ | PROT_WRITE, MAP_SHARED, fd_, 0)); + (mmap(nullptr, filesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd_, 0)); if(!mapaddr_) { errNum = errno; }