From: Rich Felker Date: Fri, 13 Jul 2012 01:49:30 +0000 (-0400) Subject: mipsel (little endian) support X-Git-Tag: v0.9.3~26 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e1e4d6b269dd5c03480d55b031f2932df0490c96;p=oweals%2Fmusl.git mipsel (little endian) support the fields in the mcontext_t are long long (for no good reason) even on 32-bit mips, so the offset of the instruction pointer (as a word) varies depending on endianness. --- diff --git a/arch/mips/pthread_arch.h b/arch/mips/pthread_arch.h index 60296fd6..f75379cf 100644 --- a/arch/mips/pthread_arch.h +++ b/arch/mips/pthread_arch.h @@ -5,4 +5,4 @@ static inline struct pthread *__pthread_self() return self; } -#define CANCEL_REG_IP 3 +#define CANCEL_REG_IP (3-(union {int __i; char __b;}){1}.__b)