[PATCH v3] io: fix ftw ABI on MIPS n64
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Tue Aug 4 14:09:49 GMT 2026
On 03/08/26 07:46, Adhemerval Zanella Netto wrote:
>
>
> On 01/08/26 15:34, Xi Ruoyao wrote:
>> On Mon, 2026-07-27 at 09:29 -0300, Adhemerval Zanella Netto wrote:
>>>
>>>
>>> On 22/07/26 08:26, Xi Ruoyao wrote:
>>>> On MIPS n64 off_t is same as off64_t, but struct stat is not same as
>>>> struct stat64 (very peculiar but see the "as tempting as it..." comment
>>>> in linux/mips/kernel_stat.h). As the ftw/ftw64 callback accepts a
>>>> pointer to a function who accepts struct stat/stat64, for MIPS n64 we
>>>> must use different implementations for ftw and ftw64.
>>>>
>>>> Thus for testing if ftw64 can be aliased to ftw, we should check
>>>> XSTAT_IS_XSTAT64 instead of __OFF_T_MATCHES_OFF64_T.
>>>>
>>>> This resolves the io/tst-ftw-lnk failure observed on MIPS n64.
>>>>
>>>> Link: https://sourceware.org/glibc/wiki/Testing/Tests/io/tst-ftw-lnk
>>>> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
>>>
>>> Sigh, stat ABI strikes again... LTGM, thanks.
>>>
>>> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>>
>> I've no write access yet, please push it.
>>
>> (Or maybe I could make an application for the write access?)
>>
>
> I will install this for you today.
And it seems to broke Hurd:
ftw.c:21:10: fatal error: kernel_stat.h: No such file or directory
21 | #include <kernel_stat.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
I will fix it as well.
More information about the Libc-alpha
mailing list