From b1e7c13cc58572600809d5173fed2c00c38af2e7 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 23 Jun 2017 17:52:55 +0200 Subject: [PATCH] resolv: Clean up declarations of the __res_initstamp variable --- ChangeLog | 7 +++++++ resolv/res_init.c | 2 +- resolv/res_libc.c | 2 +- resolv/resolv-internal.h | 3 +++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 12f1e3bce6..3108d48641 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2017-06-23 Florian Weimer + + * resolv/resolv-internal.h (__res_initstamp): Declare. + * resolv/res_init.c (__res_initstamp): Remove hidden attribute. + It is implied by the declaration. + * resolv/res_libc.c (__res_initstamp): Remove declaration. + 2017-06-23 Florian Weimer [BZ #21662] diff --git a/resolv/res_init.c b/resolv/res_init.c index ed5a4d4804..9aa907ee19 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -105,7 +105,7 @@ static void res_setoptions (res_state, const char *, const char *); static uint32_t net_mask (struct in_addr); -unsigned long long int __res_initstamp attribute_hidden; +unsigned long long int __res_initstamp; int res_ninit (res_state statp) diff --git a/resolv/res_libc.c b/resolv/res_libc.c index 3bf3887b0c..f322e8ce3f 100644 --- a/resolv/res_libc.c +++ b/resolv/res_libc.c @@ -25,8 +25,8 @@ #include #include #include +#include -extern unsigned long long int __res_initstamp attribute_hidden; /* We have atomic increment operations on 64-bit platforms. */ #if __WORDSIZE == 64 # define atomicinclock(lock) (void) 0 diff --git a/resolv/resolv-internal.h b/resolv/resolv-internal.h index 9afaa07d8b..5a9faf8de9 100644 --- a/resolv/resolv-internal.h +++ b/resolv/resolv-internal.h @@ -65,4 +65,7 @@ int __res_nopt (res_state, int n0, unsigned char *buf, int buflen, int __inet_pton_length (int af, const char *src, size_t srclen, void *); libc_hidden_proto (__inet_pton_length) +/* Used to propagate the effect of res_init calls across threads. */ +extern unsigned long long int __res_initstamp attribute_hidden; + #endif /* _RESOLV_INTERNAL_H */