1. 程式人生 > >Ubuntu18.04編譯Yocto:struct ucontext未定義

Ubuntu18.04編譯Yocto:struct ucontext未定義

/********************************************************************** 報錯資訊: ERROR: | /mnt/hdd/home/yangzf/yocto/fsl-release-bsp/build-fb/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/qemu-2.5.0/user-exec.c:214:41: error: dereferencing pointer to incomplete type ‘struct ucontext’

說明:在Ubuntu 18.04上編譯Yocto,出現的struct ucontext未定義的問題

2018-10-9 佛山順德 Yangzf /********************************************************************** 一、解決辦法: 在/mnt/hdd/home/yangzf/yocto/fsl-release-bsp/build-fb/tmp/work/x86_64-linux/qemu-native/2.5.0-r1/qemu-2.5.0/user-exec.c檔案中,增加下列定義:

typedef struct ucontext { unsigned long int uc_flags; struct ucontext *uc_link; __sigset_t uc_sigmask; stack_t uc_stack; mcontext_t uc_mcontext; long int uc_filler[5]; };