* fhandler.cc (fhandler_disk_file::fstat): Allow block calculation to succeed

for files >= 2GB and <= 4GB.
This commit is contained in:
Christopher Faylor
2000-07-27 14:26:03 +00:00
parent f90b3fcd98
commit 6864e5d7b4
2 changed files with 6 additions and 1 deletions

View File

@@ -946,7 +946,7 @@ fhandler_disk_file::fstat (struct stat *buf)
}
buf->st_blksize = S_BLKSIZE;
buf->st_blocks = (buf->st_size + S_BLKSIZE-1) / S_BLKSIZE;
buf->st_blocks = ((unsigned long) buf->st_size + S_BLKSIZE-1) / S_BLKSIZE;
/* Using a side effect: get_file_attibutes checks for
directory. This is used, to set S_ISVTX, if needed. */