From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 25752 invoked from network); 11 Dec 2020 23:56:47 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 11 Dec 2020 23:56:47 -0000 Received: (qmail 31951 invoked by uid 550); 11 Dec 2020 23:56:42 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 31914 invoked from network); 11 Dec 2020 23:56:41 -0000 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dereferenced.org; s=default; t=1607730990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ddbGx9BBYghqOFUFnjeInAHIiHpy80zSPJ23reX9aq4=; b=pV5E0c+Ew/tj08ugZQWk7RAeKHysp/VcYfV8VBhuPHADxf30fb2gqZtelIDZeRfbWemTPW YusK5wqp9oSSItO7Vn4HklEuUT1Q3KFqaTQqWcT8jQLiLHsz6CxwB5gGfxZ6XFjUf2iPa/ /C6G+CaX63Sb6BbaR3Mca77Ny7skTko= From: Ariadne Conill To: musl@lists.openwall.com Cc: Ariadne Conill Message-Id: <20201211235620.4223-1-ariadne@dereferenced.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: ariadne@dereferenced.org Date: Fri, 11 Dec 2020 23:56:30 GMT Subject: [musl] [PATCH] sh: fix incorrect GNU mcontext_t member definitions When compiling as _GNU_SOURCE, mcontext_t structure mirrors names used in sigcontext structure, but without the sc_ prefix. Split out sigcontext structure and adjust the mcontext_t member names accordingly. This is necessary to compile libucontext on sh architecture. --- arch/sh/bits/signal.h | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/arch/sh/bits/signal.h b/arch/sh/bits/signal.h index 160311fa..82a9cba0 100644 --- a/arch/sh/bits/signal.h +++ b/arch/sh/bits/signal.h @@ -9,7 +9,16 @@ #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) typedef int greg_t, gregset_t[16]; typedef int freg_t, fpregset_t[16]; -typedef struct sigcontext { +typedef struct { + unsigned long oldmask; + unsigned long regs[16]; + unsigned long pc, pr, sr; + unsigned long gbr, mach, macl; + unsigned long fpregs[16]; + unsigned long xfpregs[16]; + unsigned int fpscr, fpul, ownedfp; +} mcontext_t; +struct sigcontext { unsigned long oldmask; unsigned long sc_regs[16]; unsigned long sc_pc, sc_pr, sc_sr; @@ -17,7 +26,7 @@ typedef struct sigcontext { unsigned long sc_fpregs[16]; unsigned long sc_xfpregs[16]; unsigned int sc_fpscr, sc_fpul, sc_ownedfp; -} mcontext_t; +}; #else typedef struct { unsigned long __regs[58]; -- 2.29.2