1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

s3: fix calculation of st_blocks in init_stat_ex_from_stat

this is just relevant for the very rare systems that don't have the st_blocks
struct member. This is a fixup of the fix for bug 7474.

Thanks to Joachim Schmitz for spotting this!
This commit is contained in:
Björn Jacke 2010-06-09 15:21:24 +02:00
parent 8823bdc7e2
commit 687c42ee65

View File

@ -543,7 +543,7 @@ static void init_stat_ex_from_stat (struct stat_ex *dst,
#ifdef HAVE_STAT_ST_BLOCKS
dst->st_ex_blocks = src->st_blocks;
#else
dst->st_ex_blocks = src->st_size % STAT_ST_BLOCKSIZE + 1;
dst->st_ex_blocks = src->st_size / dst->st_ex_blksize + 1;
#endif
#ifdef HAVE_STAT_ST_FLAGS