From patchwork Sat Oct 31 18:59:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Khem Raj X-Patchwork-Id: 9491 Received: (qmail 37624 invoked by alias); 31 Oct 2015 18:59:51 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 37610 invoked by uid 89); 31 Oct 2015 18:59:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-qg0-f52.google.com Received: from mail-qg0-f52.google.com (HELO mail-qg0-f52.google.com) (209.85.192.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 31 Oct 2015 18:59:49 +0000 Received: by qgem9 with SMTP id m9so87053803qge.1 for ; Sat, 31 Oct 2015 11:59:46 -0700 (PDT) X-Received: by 10.140.27.171 with SMTP id 40mr19399213qgx.31.1446317986915; Sat, 31 Oct 2015 11:59:46 -0700 (PDT) Received: from khem-dvm-001.sys.comcast.net (a-96-119-177-31.sys.comcast.net. [96.119.177.31]) by smtp.gmail.com with ESMTPSA id m8sm363282qki.3.2015.10.31.11.59.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 31 Oct 2015 11:59:46 -0700 (PDT) From: Khem Raj To: gdb-patches@sourceware.org Cc: Khem Raj Subject: [PATCH] Do not use internal definition of SIGRTMIN Date: Sat, 31 Oct 2015 18:59:37 +0000 Message-Id: <1446317977-24319-1-git-send-email-raj.khem@gmail.com> Define W_STOPCODE if not defined already __SIGRTMIN is internal to glibc and other libcs e.g. musl may not provide them 2015-10-30 Khem Raj PR 13012 * linux-nat.c (lin_thread_get_thread_signals): Use SIGRTMIN * instead of __SIGRTMIN. * nat/linux-nat.h(W_STOPCODE): Define W_STOPCODE if not already * defined. --- gdb/linux-nat.c | 4 ++-- gdb/nat/linux-nat.h | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gdb/linux-nat.c b/gdb/linux-nat.c index 841ec39..12cf91b 100644 --- a/gdb/linux-nat.c +++ b/gdb/linux-nat.c @@ -5227,10 +5227,10 @@ lin_thread_get_thread_signals (sigset_t *set) fortunately they don't change! */ if (restart == 0) - restart = __SIGRTMIN; + restart = SIGRTMIN; if (cancel == 0) - cancel = __SIGRTMIN + 1; + cancel = SIGRTMIN + 1; sigaddset (set, restart); sigaddset (set, cancel); diff --git a/gdb/nat/linux-nat.h b/gdb/nat/linux-nat.h index 70e6274..34c9feb 100644 --- a/gdb/nat/linux-nat.h +++ b/gdb/nat/linux-nat.h @@ -30,6 +30,10 @@ struct arch_lwp_info; #define __SIGRTMIN 32 #endif +#ifndef W_STOPCODE +#define W_STOPCODE(sig) ((sig) << 8 | 0x7f) +#endif + /* Unlike other extended result codes, WSTOPSIG (status) on PTRACE_O_TRACESYSGOOD syscall events doesn't return SIGTRAP, but instead SIGTRAP with bit 7 set. */