summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2010-06-09 15:21:24 +0200
committerBjörn Jacke <bj@sernet.de>2010-06-09 15:27:38 +0200
commit687c42ee6526ff5deb9f3a8d7c13667b520b7440 (patch)
treeed0be6607112fe2bda771121ffd2412661193a13 /source3/lib
parent8823bdc7e2d141add138420feadd86837ea2257d (diff)
downloadsamba-687c42ee6526ff5deb9f3a8d7c13667b520b7440.tar.gz
samba-687c42ee6526ff5deb9f3a8d7c13667b520b7440.tar.bz2
samba-687c42ee6526ff5deb9f3a8d7c13667b520b7440.zip
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!
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c
index 7859c61087..2877ba9fd8 100644
--- a/source3/lib/system.c
+++ b/source3/lib/system.c
@@ -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