cannot convert ‘mcontext_t*’ to ‘sigcontext*’ in assignment
- by user353573
i have checked asm/ucontext.h
it should be sigcontext, but why pop up the error message
cannot convert ‘mcontext_t*’ to ‘sigcontext*’ in assignment
#include <stdio.h>
#include <signal.h>
#include <asm/ucontext.h>
static unsigned long target;
void handler(int signum, siginfo_t *siginfo, void *uc0){
struct ucontext *uc;
struct sigcontext *sc;
uc = (struct ucontext *)uc0;
sc = &uc->uc_mcontext;
sc->eip = target;
}
struct ucontext {
unsigned long uc_flags;
struct ucontext *uc_link;
stack_t uc_stack;
struct sigcontext uc_mcontext;
sigset_t uc_sigmask; /* mask last for extensibility */
};