Subject: Fwd: Bug#983706: gzip FTBFS on mips64el: FAIL: timestamp

From: Milan Kupcevic <[email-masked]>
Date: Fri, 5 Mar 2021 23:40:25 -0500

Hi Paul,

Please take a look at YunQiang's explanation of what is going on.

-------- Forwarded Message --------
Subject: Bug#983706: gzip FTBFS on mips64el: FAIL: timestamp
Resent-Date: Mon, 01 Mar 2021 10:54:34 +0000
Resent-From: YunQiang Su <[email-masked]>
Resent-To: [email-masked]
Resent-CC: Milan Kupcevic <[email-masked]>
Date: Mon, 1 Mar 2021 18:52:50 +0800
From: YunQiang Su <[email-masked]>
Reply-To: YunQiang Su <[email-masked]>, [email-masked]
To: Adrian Bunk <[email-masked]>
CC: [email-masked], [email-masked]

[...]

With some digging, we found the real problem:
    mips64 has y2106 problem

the struct stat in asm/stat.h, the timestamp is unsigned int (uint32_t),
so in the SYS_stat, -1 is converted to 0xffffff.

Then in glibc wrapper of stat, 0xffffffff need to convert to int64_t,
then, it is converted to 2016.

So, current, for gzip, we can just ignore the test fails on mips64el.

To solve this problem: I guess that we can wrap `statx' instead of
`stat' in glibc.
Since the timestamp in bits/stat.h is 64bit, there will no ABI broken.

[...]

-- 
YunQiang Su