From a8a8e85279e18686f0074d2cb6e66b8beb5a8005 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Fri, 30 Dec 2016 11:28:19 +0300 Subject: [PATCH] (vfs_s_default_stat): define st_blksize and st_blocks explicitly. Signed-off-by: Andrew Borodin --- lib/vfs/direntry.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/vfs/direntry.c b/lib/vfs/direntry.c index 46cbcb211..0515b377e 100644 --- a/lib/vfs/direntry.c +++ b/lib/vfs/direntry.c @@ -995,6 +995,12 @@ vfs_s_default_stat (struct vfs_class *me, mode_t mode) st.st_rdev = 0; st.st_uid = getuid (); st.st_gid = getgid (); +#ifdef HAVE_STRUCT_STAT_ST_BLKSIZE + st.st_blksize = 512; +#endif +#ifdef HAVE_STRUCT_STAT_ST_BLOCKS + st.st_blocks = 0; +#endif st.st_size = 0; st.st_mtime = st.st_atime = st.st_ctime = time (NULL);