From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 49912 invoked by alias); 24 May 2015 03:04:41 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 49899 invoked by uid 89); 24 May 2015 03:04:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Message-ID: <55613FBA.1020003@redhat.com> Date: Sun, 24 May 2015 15:07:00 -0000 From: "Carlos O'Donell" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: sellcey@imgtec.com, GNU C Library , Khem Raj CC: Roland McGrath Subject: Re: [PATCH] Fix missing err declaration in __pthread_initialize_minimal_internal References: <1432312942.16668.92.camel@ubuntu-sellcey> In-Reply-To: <1432312942.16668.92.camel@ubuntu-sellcey> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-05/txt/msg00572.txt.bz2 On 05/22/2015 12:42 PM, Steve Ellcey wrote: > Roland's patch (https://sourceware.org/ml/libc-alpha/2015-05/msg00464.html) > to set tid field to a unique value removed the declaration of err > [INTERNAL_SYSCALL_DECL (err);] from __pthread_initialize_minimal_internal, > but there are other uses of err in other INTERNAL_SYSCALL's in > __pthread_initialize_minimal_internal so this broke the build glibc build > for MIPS (and presumably other platforms). > > Here is a patch to put the declaration back. I think the only question > is exactly where this declaration should go. I initially put it right > in front of the first INTERNAL_SYSCALL call but I noticed that that is inside > of an ifdef and there are other INTERNAL_SYSCALL uses (with err) that > are in different ifdef's so I moved the declaration outside of any ifdef's. > This fixed my build problem. OK to checkin? > > Steve Ellcey > sellcey@imgtec.com > > > > 2015-05-22 Steve Ellcey > > * nptl/nptl-init.c (__pthread_initialize_minimal_internal): > Add declaration of err that was removed in earlier patch. > > > > diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c > index 5b8d931..3bfb478 100644 > --- a/nptl/nptl-init.c > +++ b/nptl/nptl-init.c > @@ -326,6 +326,7 @@ __pthread_initialize_minimal_internal (void) > pd->robust_prev = &pd->robust_head; > #endif > pd->robust_head.list = &pd->robust_head; > + INTERNAL_SYSCALL_DECL (err); Why isn't this inside the inner ifdef? > #ifdef __NR_set_robust_list > pd->robust_head.futex_offset = (offsetof (pthread_mutex_t, __data.__lock) > - offsetof (pthread_mutex_t, As Florian mentioned to Raj, the definition of the err decl should be in the same scope as the syscall that uses it. Did I miss something? Cheers, Carlos.