From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13763 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "A. Wilcox" Newsgroups: gmane.linux.lib.musl.general Subject: [PATCH] powerpc64: use a type for mcontext_t regs field Date: Tue, 12 Feb 2019 09:35:22 -0600 Message-ID: <20190212153522.2371-1-AWilcox@Wilcox-Tech.com> Reply-To: musl@lists.openwall.com Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="165181"; mail-complaints-to="usenet@blaine.gmane.org" Cc: "A. Wilcox" To: musl@lists.openwall.com Original-X-From: musl-return-13779-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 12 16:35:33 2019 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.89) (envelope-from ) id 1gta5s-000glh-RE for gllmg-musl@m.gmane.org; Tue, 12 Feb 2019 16:35:32 +0100 Original-Received: (qmail 12100 invoked by uid 550); 12 Feb 2019 15:35:30 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 12056 invoked from network); 12 Feb 2019 15:35:29 -0000 X-Mailer: git-send-email 2.19.2 Xref: news.gmane.org gmane.linux.lib.musl.general:13763 Archived-At: GCC Go dereferences `regs` for `nip`. Without this change, compilation fails with the following message: ../../../libgo/runtime/go-signal.c: In function ‘getSiginfo’: ../../../libgo/runtime/go-signal.c:225:56: warning: dereferencing ‘void *’ pointer ret.sigpc = ((ucontext_t*)(context))->uc_mcontext.regs->nip; ^~ ../../../libgo/runtime/go-signal.c:225:56: error: request for member ‘nip’ in something not a structure or union --- arch/powerpc64/bits/signal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/powerpc64/bits/signal.h b/arch/powerpc64/bits/signal.h index 34693a68..6736c69a 100644 --- a/arch/powerpc64/bits/signal.h +++ b/arch/powerpc64/bits/signal.h @@ -8,6 +8,8 @@ #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) +#include + typedef unsigned long greg_t, gregset_t[48]; typedef struct { @@ -29,7 +31,7 @@ typedef struct sigcontext { int _pad0; unsigned long handler; unsigned long oldmask; - void *regs; + struct pt_regs *regs; gregset_t gp_regs; fpregset_t fp_regs; vrregset_t *v_regs; -- 2.19.2