+18
−0
+88
−0
Loading
For Rust on powerpc (the libc crate in its glibc _TIME_BITS=64 mode),
compared field by field against what rustc computes for
powerpc-unknown-linux-gnu: every struct matched -- timespec with its
big-endian padding before tv_nsec, timeval, dirent64, rusage, msghdr,
sigaction -- except struct stat. systempp used x86_64's layout on every
target (st_nlink before st_mode, a pad before st_rdev, 136 bytes on
ppc32); 32-bit targets now have glibc's generic __stat64_t64 one (112
bytes). stat() fills it by field name from statx, so only the header
changes; x86_64 is unchanged.
glibc_compat.cpp gets the time64 symbol names (__clock_gettime64,
__stat64_time64, __nanosleep64, __ppoll64, __recvmsg64, ... 47 of them,
those whose function systempp has) on 32-bit targets, each the plain
function since time_t is 64-bit there already.
Checked on ppc under qemu: stat/fstat/__stat64_time64 agree with the
host, __clock_gettime64 works. x86_64 ctest: 170/171, e2e_uid_r_src
fails only because the host now runs a uid_r kernel and the test
expects to run as root.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>