The 11/10/2023 19:48, Florian Weimer wrote: > * config/aarch64/linux-unwind.h > (aarch64_fallback_frame_state): Add cast to the expected type > in sc assignment. > > (Almost a v2, but the other issue was already fixed via in r14-4183.) > > --- > libgcc/config/aarch64/linux-unwind.h | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/libgcc/config/aarch64/linux-unwind.h > b/libgcc/config/aarch64/linux-unwind.h > index 00eba866049..18b3df71e7b 100644 > --- a/libgcc/config/aarch64/linux-unwind.h > +++ b/libgcc/config/aarch64/linux-unwind.h > @@ -77,7 +77,10 @@ aarch64_fallback_frame_state (struct _Unwind_Context > *context, > } > > rt_ = context->cfa; > - sc = &rt_->uc.uc_mcontext; > + /* Historically, the uc_mcontext member was of type struct sigcontext, but > + glibc uses a different type now with member names in the implementation > + namespace. */ > + sc = (struct sigcontext *) &rt_->uc.uc_mcontext;
FWIW this looks good to me. (but i cannot approve patches) (changing the type of sc to mcontext_t* is another option, but then _GNU_SOURCE is required for the field names to remain the same across glibc versions, while struct sigcontext* is unlikely to cause API issues.) > > /* This define duplicates the definition in aarch64.md */ > #define SP_REGNUM 31 > > base-commit: 3a6df3281a525ae6113f50d7b38b09fcd803801e >