aboutsummaryrefslogblamecommitdiffstats
path: root/community/qemu/fix-ppc.patch
blob: 8ff64371f7755fd812ec0dd194b07f26f8fab1e0 (plain) (tree)
1
2
3
4
5
6
7
8
                                                                                  
                                 

                                       


                          
 





                                                                 

                                                       
                                      
diff --git a/linux-user/host/ppc/host-signal.h b/linux-user/host/ppc/host-signal.h
index 1d8e658ff..9dc6fdb3e 100644
--- a/linux-user/host/ppc/host-signal.h
+++ b/linux-user/host/ppc/host-signal.h
@@ -11,6 +11,12 @@
 #ifndef PPC_HOST_SIGNAL_H
 #define PPC_HOST_SIGNAL_H
 
+// On PowerPC, ucontext.h uses a pt_regs struct as an incomplete
+// type. This type must be completed by including asm/ptrace.h.
+#ifdef __PPC__
+#include <asm/ptrace.h>
+#endif
+
 static inline uintptr_t host_signal_pc(ucontext_t *uc)
 {
     return uc->uc_mcontext.regs->nip;