(vfs_s_default_stat): define st_blksize and st_blocks explicitly.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2016-12-30 11:28:19 +03:00
parent 7e4a59e8d6
commit a8a8e85279

View File

@ -995,6 +995,12 @@ vfs_s_default_stat (struct vfs_class *me, mode_t mode)
st.st_rdev = 0; st.st_rdev = 0;
st.st_uid = getuid (); st.st_uid = getuid ();
st.st_gid = getgid (); 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_size = 0;
st.st_mtime = st.st_atime = st.st_ctime = time (NULL); st.st_mtime = st.st_atime = st.st_ctime = time (NULL);