mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Dmitry Ivanov <dmitrijs.ivanovs@ubnt.com>
To: musl@lists.openwall.com
Subject: [PATCH v2] Different siginfo_t for MIPS
Date: Thu, 10 Dec 2015 15:49:18 +0200	[thread overview]
Message-ID: <20151210154918.74e590b8da604a93b17c3d49@ubnt.com> (raw)
In-Reply-To: <20151210123633.GD23362@port70.net>

Linux for MIPS has different siginfo_t structure. Also, some si_code
values are different. This patch is required for POSIX timers to work.

---
 include/signal.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/signal.h b/include/signal.h
index 559362f..c026e23 100644
--- a/include/signal.h
+++ b/include/signal.h
@@ -36,9 +36,15 @@ extern "C" {
 #define SI_ASYNCNL (-60)
 #define SI_TKILL (-6)
 #define SI_SIGIO (-5)
+#ifdef __mips__
+#define SI_ASYNCIO (-2)
+#define SI_MESGQ (-4)
+#define SI_TIMER (-3)
+#else
 #define SI_ASYNCIO (-4)
 #define SI_MESGQ (-3)
 #define SI_TIMER (-2)
+#endif
 #define SI_QUEUE (-1)
 #define SI_USER 0
 #define SI_KERNEL 128
@@ -86,7 +92,11 @@ union sigval {
 };
 
 typedef struct {
+#ifdef __mips__
+	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 {
-- 
2.1.4



  reply	other threads:[~2015-12-10 13:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 10:47 [PATCH] Separate " Dmitry Ivanov
2015-12-10 12:36 ` Szabolcs Nagy
2015-12-10 13:49   ` Dmitry Ivanov [this message]
2015-12-16  4:34   ` Rich Felker
2016-01-26 22:24     ` Szabolcs Nagy
2016-01-26 22:57       ` Rich Felker
2016-01-26 23:32         ` Szabolcs Nagy
2016-01-27  1:03           ` Szabolcs Nagy
2016-01-27  3:33             ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151210154918.74e590b8da604a93b17c3d49@ubnt.com \
    --to=dmitrijs.ivanovs@ubnt.com \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).