[PATCH] y2038: Reorder placement of st_ino in struct __stat64_t64
Lukasz Majewski
lukma@denx.de
Wed Oct 14 14:14:28 GMT 2020
Hi Adhemerval,
> On 14/10/2020 10:00, Lukasz Majewski wrote:
> > In the installed struct stat{64} the __ino64_t st_ino member is
> > placed in the end. This patch moves it to the same position as in
> > the aforementioned, exported structures as it allows less #ifdefs
> > for __USE_TIME_BITS64 support use case.
>
> Why exactly this is required? Afaik this is glibc defined type not
> currently only used internally and all member accesses are set
> directly (no use or memcpy or offsetof). Is this related to the
> issue you saw on the arm environment?
This is required to make the minimal changes to provide -D_TIME_SIZE=64
support for {f}stat{at} as in:
https://github.com/lmajewski/y2038_glibc/commit/26aa2ac07246682a505d85dac1c269689964b79b
>
> > ---
> > sysdeps/unix/sysv/linux/struct_stat_time64.h | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/sysdeps/unix/sysv/linux/struct_stat_time64.h
> > b/sysdeps/unix/sysv/linux/struct_stat_time64.h index
> > b85385b6f3..2c57f4e562 100644 ---
> > a/sysdeps/unix/sysv/linux/struct_stat_time64.h +++
> > b/sysdeps/unix/sysv/linux/struct_stat_time64.h @@ -43,7 +43,6 @@
> > struct __stat64_t64
> > {
> > __dev_t st_dev; /* Device. */
> > - __ino64_t st_ino; /* file serial
> > number. */ __mode_t st_mode; /* File
> > mode. */ __nlink_t st_nlink; /* Link count.
> > */ __uid_t st_uid; /* User ID of the file's
> > owner. */ @@ -70,6 +69,7 @@ struct __stat64_t64
> > __fieldts64 (st_mtime);
> > __fieldts64 (st_ctime);
> > # endif /* __USE_XOPEN2K8 */
> > + __ino64_t st_ino; /* file serial
> > number. */ };
> >
> > # define _STATBUF_ST_BLKSIZE
> >
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20201014/356d886b/attachment.sig>
More information about the Libc-alpha
mailing list