summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-21 20:40:33 +0100
committerMike Frysinger <vapier@gentoo.org>2015-04-21 20:40:33 +0100
commitcec418e4c2fd12fbc0a3468bacaf693911182417 (patch)
treeb02eedc0fccb82e97a2a6e9a8f6ce337615e17ba
parentinitial 4.0 patchset based on last 3.19 patchset (diff)
downloadlinux-headers-patches-cec418e4c2fd12fbc0a3468bacaf693911182417.tar.gz
linux-headers-patches-cec418e4c2fd12fbc0a3468bacaf693911182417.tar.bz2
linux-headers-patches-cec418e4c2fd12fbc0a3468bacaf693911182417.zip
fix bad asm/siginfo.h on mips
-rw-r--r--4.0/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch98
1 files changed, 98 insertions, 0 deletions
diff --git a/4.0/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch b/4.0/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch
new file mode 100644
index 0000000..af99d63
--- /dev/null
+++ b/4.0/00_all_0009-Revert-MIPS-Provide-correct-siginfo_t.si_stime.patch
@@ -0,0 +1,98 @@
+From d3fac4d14fc5ba393129ae4fbe77fa77d90446d1 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Tue, 21 Apr 2015 14:28:20 -0400
+Subject: [PATCH] Revert "MIPS: Provide correct siginfo_t.si_stime"
+
+This reverts commit 8cb48fe169dd682b6c29a3b7ef18333e4f577890.
+
+UAPI headers cannot use "uapi/" in their paths by design -- when they're
+installed, they do not have the uapi/ prefix. Otherwise doing so breaks
+userland badly:
+$ printf '#include <stddef.h>\n#include <linux/signal.h>\n' > test.c
+$ mips64-unknown-linux-gnu-gcc -c test.c
+In file included from /usr/mips64-unknown-linux-gnu/usr/include/linux/signal.h:5:0,
+ from test.c:2:
+/usr/mips64-unknown-linux-gnu/usr/include/asm/siginfo.h:31:38: fatal error: uapi/asm-generic/siginfo.h: No such file or directory
+compilation terminated.
+
+Signed-off-by: Mike Frysinger <vapier@chromium.org>
+---
+ arch/mips/include/asm/siginfo.h | 29 +++++++++++++++++++++++++++++
+ arch/mips/include/uapi/asm/siginfo.h | 11 ++++++++---
+ 2 files changed, 37 insertions(+), 3 deletions(-)
+ create mode 100644 arch/mips/include/asm/siginfo.h
+
+diff --git a/arch/mips/include/asm/siginfo.h b/arch/mips/include/asm/siginfo.h
+new file mode 100644
+index 0000000..dd9a762
+--- /dev/null
++++ b/arch/mips/include/asm/siginfo.h
+@@ -0,0 +1,29 @@
++/*
++ * This file is subject to the terms and conditions of the GNU General Public
++ * License. See the file "COPYING" in the main directory of this archive
++ * for more details.
++ *
++ * Copyright (C) 1998, 1999, 2001, 2003 Ralf Baechle
++ * Copyright (C) 2000, 2001 Silicon Graphics, Inc.
++ */
++#ifndef _ASM_SIGINFO_H
++#define _ASM_SIGINFO_H
++
++#include <uapi/asm/siginfo.h>
++
++
++/*
++ * Duplicated here because of <asm-generic/siginfo.h> braindamage ...
++ */
++#include <linux/string.h>
++
++static inline void copy_siginfo(struct siginfo *to, struct siginfo *from)
++{
++ if (from->si_code < 0)
++ memcpy(to, from, sizeof(*to));
++ else
++ /* _sigchld is currently the largest know union member */
++ memcpy(to, from, 3*sizeof(int) + sizeof(from->_sifields._sigchld));
++}
++
++#endif /* _ASM_SIGINFO_H */
+diff --git a/arch/mips/include/uapi/asm/siginfo.h b/arch/mips/include/uapi/asm/siginfo.h
+index 2cb7fde..d08f83f 100644
+--- a/arch/mips/include/uapi/asm/siginfo.h
++++ b/arch/mips/include/uapi/asm/siginfo.h
+@@ -16,6 +16,13 @@
+ #define HAVE_ARCH_SIGINFO_T
+
+ /*
++ * We duplicate the generic versions - <asm-generic/siginfo.h> is just borked
++ * by design ...
++ */
++#define HAVE_ARCH_COPY_SIGINFO
++struct siginfo;
++
++/*
+ * Careful to keep union _sifields from shifting ...
+ */
+ #if _MIPS_SZLONG == 32
+@@ -28,9 +35,8 @@
+
+ #define __ARCH_SIGSYS
+
+-#include <uapi/asm-generic/siginfo.h>
++#include <asm-generic/siginfo.h>
+
+-/* We can't use generic siginfo_t, because our si_code and si_errno are swapped */
+ typedef struct siginfo {
+ int si_signo;
+ int si_code;
+@@ -118,6 +124,5 @@ typedef struct siginfo {
+ #define SI_TIMER __SI_CODE(__SI_TIMER, -3) /* sent by timer expiration */
+ #define SI_MESGQ __SI_CODE(__SI_MESGQ, -4) /* sent by real time mesq state change */
+
+-#include <asm-generic/siginfo.h>
+
+ #endif /* _UAPI_ASM_SIGINFO_H */
+--
+2.3.5
+