a2jmidid: Fix build on ppc/musl

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj 2022-03-26 11:21:27 -07:00
parent a5f244bfbf
commit dc989053c7
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,19 @@
Add musl/ppc mcontext differences specific checks to choose
correct gregs and context structure definitions
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
--- a/sigsegv.c
+++ b/sigsegv.c
@@ -95,7 +95,11 @@ static void signal_segv(int signum, sigi
for(i = 0; i < NGREG; i++)
a2j_error("reg[%02d] = 0x" REGFORMAT, i,
#if defined(__powerpc__) && !defined(__powerpc64__)
+# if defined(__GLIBC__)
ucontext->uc_mcontext.uc_regs[i]
+# else
+ ucontext->uc_regs->gregs[i]
+# endif
#elif defined(__powerpc64__)
ucontext->uc_mcontext.gp_regs[i]
#elif defined(__sparc__) && defined(__arch64__)

View File

@ -13,6 +13,7 @@ SRCREV = "de37569c926c5886768f892c019e3f0468615038"
SRC_URI = " \
git://github.com/linuxaudio/a2jmidid;protocol=https;branch=master \
file://riscv_ucontext.patch \
file://ppc_musl_ucontext.patch \
"
S = "${WORKDIR}/git"