summaryrefslogtreecommitdiff
path: root/source3/lib/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/system.c')
-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