mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
s3: fix build on platforms without st_blocks and st_blksize stat struct members
This fixes bug 7474.
This commit is contained in:
parent
99c9e358c5
commit
711a30aa61
@ -534,8 +534,17 @@ static void init_stat_ex_from_stat (struct stat_ex *dst,
|
||||
dst->st_ex_mtime = get_mtimespec(src);
|
||||
dst->st_ex_ctime = get_ctimespec(src);
|
||||
make_create_timespec(src, dst, fake_dir_create_times);
|
||||
#ifdef HAVE_STAT_ST_BLKSIZE
|
||||
dst->st_ex_blksize = src->st_blksize;
|
||||
#else
|
||||
dst->st_ex_blksize = STAT_ST_BLOCKSIZE;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STAT_ST_BLOCKS
|
||||
dst->st_ex_blocks = src->st_blocks;
|
||||
#else
|
||||
dst->st_ex_blocks = src->st_size % STAT_ST_BLOCKSIZE + 1;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STAT_ST_FLAGS
|
||||
dst->st_ex_flags = src->st_flags;
|
||||
|
Loading…
Reference in New Issue
Block a user