forked from lix-project/lix
Merge pull request #1545 from trofi/glibc-2.26
src/libmain/stack.cc: fix 'ucontext' usage on glibc-2.26
This commit is contained in:
commit
fe38fce2d8
|
@ -18,9 +18,9 @@ static void sigsegvHandler(int signo, siginfo_t * info, void * ctx)
|
|||
bool haveSP = true;
|
||||
char * sp = 0;
|
||||
#if defined(__x86_64__) && defined(REG_RSP)
|
||||
sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_RSP];
|
||||
sp = (char *) ((ucontext_t *) ctx)->uc_mcontext.gregs[REG_RSP];
|
||||
#elif defined(REG_ESP)
|
||||
sp = (char *) ((ucontext *) ctx)->uc_mcontext.gregs[REG_ESP];
|
||||
sp = (char *) ((ucontext_t *) ctx)->uc_mcontext.gregs[REG_ESP];
|
||||
#else
|
||||
haveSP = false;
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue