]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aarch64: Avoid -Wincompatible-pointer-types warning in Linux unwinder
authorFlorian Weimer <fweimer@redhat.com>
Fri, 1 Dec 2023 07:10:12 +0000 (08:10 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Fri, 1 Dec 2023 07:10:12 +0000 (08:10 +0100)
* config/aarch64/linux-unwind.h
(aarch64_fallback_frame_state): Add cast to the expected type
in sc assignment.

libgcc/config/aarch64/linux-unwind.h

index 00eba866049b5b08deb90b840c3a52f6f52968a1..18b3df71e7bab546a8dff882ad4a562fd81b7e23 100644 (file)
@@ -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;
 
 /* This define duplicates the definition in aarch64.md */
 #define SP_REGNUM 31