[PATCH 13/30] nptl: Remove open from libpthread

Florian Weimer fweimer@redhat.com
Wed Mar 17 20:11:33 GMT 2021


* Adhemerval Zanella via Libc-alpha:

> diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c
> index 98db26f501..860b5607ff 100644
> --- a/sysdeps/unix/sysv/linux/open64.c
> +++ b/sysdeps/unix/sysv/linux/open64.c
> @@ -20,8 +20,8 @@
>  #include <sys/stat.h>
>  #include <fcntl.h>
>  #include <stdarg.h>
> -
>  #include <sysdep-cancel.h>
> +#include <shlib-compat.h>
>  
>  
>  #ifdef __OFF_T_MATCHES_OFF64_T
> @@ -51,7 +51,6 @@ __libc_open64 (const char *file, int oflag, ...)
>  
>  strong_alias (__libc_open64, __open64)
>  libc_hidden_weak (__open64)
> -weak_alias (__libc_open64, open64)
>  
>  #ifdef __OFF_T_MATCHES_OFF64_T
>  strong_alias (__libc_open64, __libc_open)
> @@ -59,3 +58,11 @@ strong_alias (__libc_open64, __open)
>  libc_hidden_weak (__open)
>  weak_alias (__libc_open64, open)
>  #endif
> +
> +#if SHLIB_COMPAT (libc, GLIBC_2_1, GLIBC_2_2)
> +strong_alias (__libc_open64, __compat_open64)
> +compat_symbol (libc, __compat_open64, open64, GLIBC_2_1);
> +versioned_symbol (libc, __libc_open64, open64, GLIBC_2_2);
> +#else
> +weak_alias (__libc_open64, open64)
> +#endif

Please make open64@GLIBC_2.2 a compat symbol on the architectures that
have it.  This way, we don't have to add open64@GLIBC_2.34.

Thanks,
Florian



More information about the Libc-alpha mailing list