bd05206403
The musl headers are laid out differently, so it needs a couple workarounds to get access to all the definitions. This also fixes qemu-user-static. [ci skip] Closes: #11373 [via git-merge-pr]
16 lines
672 B
Diff
16 lines
672 B
Diff
On musl, the regs field in uc_mcontext is void * so it is necessary to
|
|
cast it. The sys/user.h include is to get access to definition of pt_regs.
|
|
--- accel/tcg/user-exec.c
|
|
+++ accel/tcg/user-exec.c
|
|
@@ -285,9 +285,10 @@ int cpu_signal_handler(int host_signum, void *pinfo,
|
|
* From Wine
|
|
*/
|
|
#ifdef linux
|
|
+#include <sys/user.h>
|
|
/* All Registers access - only for local access */
|
|
#define REG_sig(reg_name, context) \
|
|
- ((context)->uc_mcontext.regs->reg_name)
|
|
+ (((struct pt_regs *)(context)->uc_mcontext.regs)->reg_name)
|
|
/* Gpr Registers access */
|
|
#define GPR_sig(reg_num, context) REG_sig(gpr[reg_num], context)
|
|
/* Program counter */
|