From b47d02b9c69459031902f3dadca19510e54fbd9e Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Tue, 4 Apr 2023 16:42:33 -0300 Subject: [PATCH] malloc: Only set pragma weak for rpc freemem if required Both __rpc_freemem and __rpc_thread_destroy are only used if the the compat symbols are required. --- malloc/set-freeres.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/malloc/set-freeres.c b/malloc/set-freeres.c index 42d70d3..1aab34b 100644 --- a/malloc/set-freeres.c +++ b/malloc/set-freeres.c @@ -51,8 +51,10 @@ # pragma weak __libc_printf_freemem # pragma weak __libc_fmtmsg_freemem # pragma weak __libc_setenv_freemem -# pragma weak __rpc_freemem -# pragma weak __rpc_thread_destroy +# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_31) +# pragma weak __rpc_freemem +# pragma weak __rpc_thread_destroy +# endif # pragma weak __libc_getaddrinfo_freemem # pragma weak __libc_tzset_freemem # pragma weak __libc_localealias_freemem -- 2.7.4