diff mbox series

[uclibc-ng-devel,v2,1/2] mips64n32, time64: Select correct _dl_fstat impl

Message ID 20240907074848.3185-1-dm.chestnykh@gmail.com
State Accepted
Headers show
Series [uclibc-ng-devel,v2,1/2] mips64n32, time64: Select correct _dl_fstat impl | expand

Commit Message

Dmitry Chestnykh Sept. 7, 2024, 7:48 a.m. UTC
With time64 enabled we have to use statx() instead of stat() or fstat()
If the _dl_fstat implementation isn't selected correctly
we can have multiple errors inside dynamic linker
during startup of the system and of the almost every process
Add sparc exclusion like in other places inside this header

Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
---
 ldso/include/dl-syscall.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Waldemar Brodkorb Sept. 10, 2024, 3:19 a.m. UTC | #1
Hi Dmitry,

Thanks a lot. Both Applied and pushed!

 best regards
  Waldemar

Dmitry Chestnykh wrote,

> With time64 enabled we have to use statx() instead of stat() or fstat()
> If the _dl_fstat implementation isn't selected correctly
> we can have multiple errors inside dynamic linker
> during startup of the system and of the almost every process
> Add sparc exclusion like in other places inside this header
> 
> Signed-off-by: Dmitry Chestnykh <dm.chestnykh@gmail.com>
> ---
>  ldso/include/dl-syscall.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
> index 180d03012..c143b8d45 100644
> --- a/ldso/include/dl-syscall.h
> +++ b/ldso/include/dl-syscall.h
> @@ -168,7 +168,7 @@ static __always_inline int _dl_stat(const char *file_name,
>  #if defined __NR_fstat64 && !defined __NR_fstat && (!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__))
>  # define __NR__dl_fstat __NR_fstat64
>  static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
> -#elif defined __NR_fstat
> +#elif defined __NR_fstat && !defined __UCLIBC_USE_TIME64__ || defined(__sparc__)
>  # define __NR__dl_fstat __NR_fstat
>  static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
>  #elif defined __NR_statx && defined __UCLIBC_HAVE_STATX__
> -- 
> 2.46.0
> 
> _______________________________________________
> devel mailing list -- devel@uclibc-ng.org
> To unsubscribe send an email to devel-leave@uclibc-ng.org
>
diff mbox series

Patch

diff --git a/ldso/include/dl-syscall.h b/ldso/include/dl-syscall.h
index 180d03012..c143b8d45 100644
--- a/ldso/include/dl-syscall.h
+++ b/ldso/include/dl-syscall.h
@@ -168,7 +168,7 @@  static __always_inline int _dl_stat(const char *file_name,
 #if defined __NR_fstat64 && !defined __NR_fstat && (!defined(__UCLIBC_USE_TIME64__) || defined(__sparc__))
 # define __NR__dl_fstat __NR_fstat64
 static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
-#elif defined __NR_fstat
+#elif defined __NR_fstat && !defined __UCLIBC_USE_TIME64__ || defined(__sparc__)
 # define __NR__dl_fstat __NR_fstat
 static __always_inline _syscall2(int, _dl_fstat, int, fd, struct stat *, buf)
 #elif defined __NR_statx && defined __UCLIBC_HAVE_STATX__