From patchwork Fri May 22 16:42:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 6890 Received: (qmail 51766 invoked by alias); 22 May 2015 16:42:34 -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 51754 invoked by uid 89); 22 May 2015 16:42:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com Message-ID: <1432312942.16668.92.camel@ubuntu-sellcey> Subject: [PATCH] Fix missing err declaration in __pthread_initialize_minimal_internal From: Steve Ellcey Reply-To: To: GNU C Library CC: Roland McGrath Date: Fri, 22 May 2015 09:42:22 -0700 MIME-Version: 1.0 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); #ifdef __NR_set_robust_list pd->robust_head.futex_offset = (offsetof (pthread_mutex_t, __data.__lock) - offsetof (pthread_mutex_t,