diff options
author | Florian Weimer <fweimer@redhat.com> | 2018-05-15 08:21:11 +0200 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2021-08-27 16:22:13 -0700 |
commit | da768de04f2cdbf6117bddb7a23593d6fb4356fb (patch) | |
tree | 9619607526bf4d5262e7211317d58d649bc9962b /sunrpc | |
parent | 0c65d0085def8360c7aa16d8d4fa5bc8c525ec58 (diff) | |
download | glibc-da768de04f2cdbf6117bddb7a23593d6fb4356fb.zip glibc-da768de04f2cdbf6117bddb7a23593d6fb4356fb.tar.gz glibc-da768de04f2cdbf6117bddb7a23593d6fb4356fb.tar.bz2 |
sunrpc: Remove stray exports without --enable-obsolete-rpc [BZ #23166]
This is needed to avoid a warning when linking against libtirpc:
/lib64/libc.so.6: warning: common of `rpc_createerr@@TIRPC_0.3.0' overridden by definition
/usr/lib64/libtirpc.so: warning: defined here
This ld warning is not enabled by default; -Wl,--warn-common enables it.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
(cherry picked from commit 89aacb513eb77549a29df2638913a0f8178cf3f5)
Diffstat (limited to 'sunrpc')
-rw-r--r-- | sunrpc/rpc_common.c | 15 | ||||
-rw-r--r-- | sunrpc/svcauth_des.c | 13 |
2 files changed, 20 insertions, 8 deletions
diff --git a/sunrpc/rpc_common.c b/sunrpc/rpc_common.c index 7101911..2d42827 100644 --- a/sunrpc/rpc_common.c +++ b/sunrpc/rpc_common.c @@ -46,7 +46,14 @@ the variable is declared. So we use the section attribute. */ struct opaque_auth _null_auth __attribute__ ((nocommon)); libc_hidden_nolink_sunrpc (_null_auth, GLIBC_2_0) -fd_set svc_fdset; -struct rpc_createerr rpc_createerr; -struct pollfd *svc_pollfd; -int svc_max_pollfd; + +/* The variables need the nocommon attribute, so that it is possible + to create aliases and specify symbol versions. */ +fd_set svc_fdset __attribute__ ((nocommon)); +libc_hidden_nolink_sunrpc (svc_fdset, GLIBC_2_0) +struct rpc_createerr rpc_createerr __attribute__ ((nocommon)); +libc_hidden_nolink_sunrpc (rpc_createerr, GLIBC_2_0) +struct pollfd *svc_pollfd __attribute__ ((nocommon)); +libc_hidden_nolink_sunrpc (svc_pollfd, GLIBC_2_2) +int svc_max_pollfd __attribute__ ((nocommon)); +libc_hidden_nolink_sunrpc (svc_max_pollfd, GLIBC_2_2) diff --git a/sunrpc/svcauth_des.c b/sunrpc/svcauth_des.c index f99a5a3..9ce4804 100644 --- a/sunrpc/svcauth_des.c +++ b/sunrpc/svcauth_des.c @@ -87,16 +87,21 @@ static void cache_ref (uint32_t sid); /* note that sid was ref'd */ static void invalidate (char *cred); /* invalidate entry in cache */ -/* - * cache statistics - */ +/* Cache statistics. Accidental historic export without a matching + declaration in any header file. */ +#ifndef SHARED +static +#endif struct { u_long ncachehits; /* times cache hit, and is not replay */ u_long ncachereplays; /* times cache hit, and is replay */ u_long ncachemisses; /* times cache missed */ } -svcauthdes_stats; +svcauthdes_stats __attribute__ ((nocommon)); +#ifdef SHARED +compat_symbol (libc, svcauthdes_stats, svcauthdes_stats, GLIBC_2_0); +#endif /* * Service side authenticator for AUTH_DES |