On Wed, Jan 29, 2025 at 11:46:31PM +0100, Petr Vorel wrote:
> Hi all,
> 
> LTP test fstatat01.c [1] FTBFS on Buildroot bootlin-sh4-uclibc toolchain
> (uclibc: 1.0.50, kernel headers: 4.19.255). It looks to me that other bootlin
> uclibc based toolchains are working, therefore it's probably sh4 problem.
> 
> Looking into include/sys/stat.h in uclibc-ng [2], extern int fstatat (int 
> __fd,
> ...) definition is guarded only by: #  ifdef __REDIRECT_NTH.
> But in glibc io/sys/stat.h [3] guardes it with #  ifdef __USE_TIME64_REDIRECTS
> added glibc 2.40 a4ed0471d7 ("Always define __USE_TIME_BITS64 when 64 bit 
> time_t is used")
> which replaced previous __USE_TIME_BITS64 added in in glibc 2.34 47f24c21ee 
> [4]
> ("y2038: Add support for 64-bit time on legacy ABIs") [5]. Should similar 
> change
> be added to uclibc-ng?
> 
> Kind regards,
> Petr
> 
> $ cd 
> ~/br-test-pkg/bootlin-sh4-uclibc/build/ltp-testsuite-728759506cbe08612183275b3543007d1c47f7f4/testcases/kernel/syscalls/fstatat
> $ make V=1 fstatat01
> br-test-pkg/bootlin-sh4-uclibc/host/bin/sh4-linux-gcc -D_LARGEFILE_SOURCE 
> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 
> -I../../../../include -I../../../../include -I../../../../include/old/ 
> -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O2 -g0  
> -Ibr-test-pkg/bootlin-sh4-uclibc/host/bin/../sh4-buildroot-linux-uclibc/sysroot/usr/include/tirpc
>  -g -O2 -fno-strict-aliasing -pipe -Wall -W -Wold-style-definition -std=gnu99 
> -L../../../../lib fstatat01.c  
> -Lbr-test-pkg/bootlin-sh4-uclibc/host/bin/../sh4-buildroot-linux-uclibc/sysroot/usr/lib
>  -ltirpc -lfts -lltp -o fstatat01
> fstatat01.c:63:5: error: conflicting types for ‘fstatat’; have ‘int(int,  
> const char *, struct stat64 *, int)’
>    63 | int fstatat(int dirfd, const char *filename, struct stat64 *statbuf, 
> int flags)
>       |     ^~~~~~~
> In file included from 
> br-test-pkg/bootlin-sh4-uclibc/host/sh4-buildroot-linux-uclibc/sysroot/usr/include/features.h:409,
>                  from 
> br-test-pkg/bootlin-sh4-uclibc/host/sh4-buildroot-linux-uclibc/sysroot/usr/include/sys/types.h:26,
>                  from fstatat01.c:27:
> br-test-pkg/bootlin-sh4-uclibc/host/sh4-buildroot-linux-uclibc/sysroot/usr/include/sys/stat.h:243:12:
>  note: previous declaration of ‘fstatat’ with type ‘int(int,  const char * 
> restrict,  struct stat * restrict,  int)’
>   243 | extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict 
> __file,
>       |            ^~~~~~~~~~~~~~
> 
> [1] 
> https://github.com/linux-test-project/ltp/blob/master/testcases/kernel/syscalls/fstatat/fstatat01.c
> [2] 
> https://cgit.openadk.org/cgi/cgit/uclibc-ng.git/tree/include/sys/stat.h#n247
> [3] 
> https://sourceware.org/git/?p=glibc.git;a=blob;f=io/sys/stat.h;h=4bea9e9a7785f51af8eefd035874f475b92bb26d;hb=HEAD#l268
> [4] 
> https://sourceware.org/git/?p=glibc.git;a=commit;h=a4ed0471d71739928a0d0fa3258b3ff3b158e9b9
> [5] 
> https://sourceware.org/git/?p=glibc.git;a=commit;h=47f24c21ee38701ae275aa9e451f70fa3e77478c
> _______________________________________________
> devel mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
My guess is that this is somehow caused by the fact that time64 on 32-bit 
targets is
not supported on Linux < 5.1.0.

Regards,
Nadav
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to