提交 9a3b8f97 编写于 作者: S Szabolcs Nagy 提交者: Rich Felker

fix siginfo_t for mips

si_errno and si_code are swapped in mips siginfo_t compared to other
archs and some si_code values are different.  This fix is required
for POSIX timers to work.

based on patch by Dmitry Ivanov.
上级 22f84829
......@@ -73,6 +73,15 @@ typedef struct __ucontext {
#define SIG_UNBLOCK 2
#define SIG_SETMASK 3
#undef SI_ASYNCIO
#undef SI_MESGQ
#undef SI_TIMER
#define SI_ASYNCIO (-2)
#define SI_MESGQ (-4)
#define SI_TIMER (-3)
#define __SI_SWAP_ERRNO_CODE
#endif
#define SIGHUP 1
......
......@@ -94,7 +94,11 @@ union sigval {
};
typedef struct {
#ifdef __SI_SWAP_ERRNO_CODE
int si_signo, si_code, si_errno;
#else
int si_signo, si_errno, si_code;
#endif
union {
char __pad[128 - 2*sizeof(int) - sizeof(long)];
struct {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册