Debian

解決"dereferencing pointer to incomplete type struct ucontext"問題


參考資訊:
1. qemu-devel

問題如下:

qemu/user-exec.c: In function ‘cpu_resume_from_signal’:
qemu/user-exec.c:70:55: error: dereferencing pointer to incomplete type ‘struct ucontext’
         sigprocmask(SIG_SETMASK, (struct ucontext*)&uc->uc_sigmask, NULL);
                                                       ^~
qemu/user-exec.c: In function ‘cpu_x86_signal_handler’:
qemu/user-exec.c:211:41: error: dereferencing pointer to incomplete type ‘struct ucontext’
 #define PC_sig(context)       ((context)->uc_mcontext.gregs[REG_RIP])
                                         ^~
qemu/user-exec.c:230:10: note: in expansion of macro ‘PC_sig’
     pc = PC_sig(uc);
          ^~~~~~
qemu/user-exec.c:235:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
make[1]: *** [qemu/rules.mak:18: user-exec.o] Error 1
make: *** [Makefile:84: subdir-i386-linux-user] Error 2

P.S. 解法:把struct ucontext都替換成ucontext_t即可


返回上一頁