mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
alpha: Remove anonymous union in struct stat [BZ #27042]
This is clever, but it confuses downstream detection in at least zstd and GNOME's glib. zstd has preprocessor tests for the 'st_mtime' macro, which is not provided by the path using the anonymous union; glib checks for the presence of 'st_mtimensec' in struct stat but then tries to access that field in struct statx (which might be a bug on its own). Checked with a build for alpha-linux-gnu.
This commit is contained in:
committed by
Adhemerval Zanella
parent
cad5ad81d2
commit
d552058570
@ -44,9 +44,9 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
|
||||
buf->st_gid = kbuf->st_gid;
|
||||
buf->st_rdev = kbuf->st_rdev;
|
||||
buf->st_size = kbuf->st_size;
|
||||
buf->st_atime = kbuf->st_atime;
|
||||
buf->st_mtime = kbuf->st_mtime;
|
||||
buf->st_ctime = kbuf->st_ctime;
|
||||
buf->st_atime_sec = kbuf->st_atime_sec;
|
||||
buf->st_mtime_sec = kbuf->st_mtime_sec;
|
||||
buf->st_ctime_sec = kbuf->st_ctime_sec;
|
||||
buf->st_blksize = kbuf->st_blksize;
|
||||
buf->st_blocks = kbuf->st_blocks;
|
||||
buf->st_flags = kbuf->st_flags;
|
||||
@ -66,9 +66,9 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
|
||||
buf->st_gid = kbuf->st_gid;
|
||||
buf->st_rdev = kbuf->st_rdev;
|
||||
buf->st_size = kbuf->st_size;
|
||||
buf->st_atime = kbuf->st_atime;
|
||||
buf->st_mtime = kbuf->st_mtime;
|
||||
buf->st_ctime = kbuf->st_ctime;
|
||||
buf->st_atime_sec = kbuf->st_atime_sec;
|
||||
buf->st_mtime_sec = kbuf->st_mtime_sec;
|
||||
buf->st_ctime_sec = kbuf->st_ctime_sec;
|
||||
buf->st_blocks = kbuf->st_blocks;
|
||||
buf->st_blksize = kbuf->st_blksize;
|
||||
buf->st_flags = kbuf->st_flags;
|
||||
@ -98,12 +98,12 @@ __xstat_conv (int vers, struct kernel_stat *kbuf, void *ubuf)
|
||||
buf->st_nlink = kbuf->st_nlink;
|
||||
buf->__pad0 = 0;
|
||||
|
||||
buf->st_atime = kbuf->st_atime;
|
||||
buf->st_atimensec = 0;
|
||||
buf->st_mtime = kbuf->st_mtime;
|
||||
buf->st_mtimensec = 0;
|
||||
buf->st_ctime = kbuf->st_ctime;
|
||||
buf->st_ctimensec = 0;
|
||||
buf->st_atim.tv_sec = kbuf->st_atime_sec;
|
||||
buf->st_atim.tv_nsec = 0;
|
||||
buf->st_mtim.tv_sec = kbuf->st_mtime_sec;
|
||||
buf->st_mtim.tv_nsec = 0;
|
||||
buf->st_ctim.tv_sec = kbuf->st_ctime_sec;
|
||||
buf->st_ctim.tv_nsec = 0;
|
||||
|
||||
buf->__glibc_reserved[0] = 0;
|
||||
buf->__glibc_reserved[1] = 0;
|
||||
|
Reference in New Issue
Block a user