You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-util/ccache/files/ccache-3.1.10-size-on-disk....

22 lines
518 B

https://bugs.gentoo.org/56178
stick to the size of files on disk rather than their byte size.
this func is only used for stats management, so this should be safe.
--- a/util.c
+++ b/util.c
@@ -845,12 +845,7 @@ file_size(struct stat *st)
#ifdef _WIN32
return (st->st_size + 1023) & ~1023;
#else
- size_t size = st->st_blocks * 512;
- if ((size_t)st->st_size > size) {
- /* probably a broken stat() call ... */
- size = (st->st_size + 1023) & ~1023;
- }
- return size;
+ return st->st_blocks * 512;
#endif
}