From patchwork Fri Jun 23 15:56:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 21236 Received: (qmail 4288 invoked by alias); 23 Jun 2017 15:56:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 3886 invoked by uid 89); 23 Jun 2017 15:56:36 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7A63CC012874 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7A63CC012874 Date: Fri, 23 Jun 2017 17:56:33 +0200 To: libc-alpha@sourceware.org Subject: [PATCH COMMITTED] resolv: Clean up declarations of the __res_initstamp variable User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20170623155633.7FFAC439942F0@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) 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. diff --git a/resolv/res_init.c b/resolv/res_init.c index ed5a4d4..9aa907e 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 3bf3887..f322e8c 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 9afaa07..5a9faf8 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 */