summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/linux-headers/files/linux-headers-2.6.8.1-sparc-glibcsafe.patch')
-rw-r--r--sys-kernel/linux-headers/files/linux-headers-2.6.8.1-sparc-glibcsafe.patch119
1 files changed, 119 insertions, 0 deletions
diff --git a/sys-kernel/linux-headers/files/linux-headers-2.6.8.1-sparc-glibcsafe.patch b/sys-kernel/linux-headers/files/linux-headers-2.6.8.1-sparc-glibcsafe.patch
new file mode 100644
index 000000000000..9bddffada13c
--- /dev/null
+++ b/sys-kernel/linux-headers/files/linux-headers-2.6.8.1-sparc-glibcsafe.patch
@@ -0,0 +1,119 @@
+--- linux/include/asm-sparc/processor.h.orig 2004-12-11 22:21:32.889748424 -0800
++++ linux/include/asm-sparc/processor.h 2004-12-11 22:21:21.616462224 -0800
+@@ -43,7 +43,11 @@
+
+ struct task_struct;
+
+-struct fpq {
++#ifdef __KERNEL__
++#define __fpq fpq
++#endif
++
++struct __fpq {
+ unsigned long *insn_addr;
+ unsigned long insn;
+ };
+@@ -65,13 +69,17 @@ struct thread_struct {
+ unsigned long float_regs[32] __attribute__ ((aligned (8)));
+ unsigned long fsr;
+ unsigned long fpqdepth;
+- struct fpq fpqueue[16];
++ struct __fpq fpqueue[16];
+ unsigned long flags;
+ mm_segment_t current_ds;
+ struct exec core_exec; /* just what it says. */
+ int new_signal;
+ };
+
++#ifdef __KERNEL__
++#undef __fpq
++#endif
++
+ #define SPARC_FLAG_KTHREAD 0x1 /* task is a kernel thread */
+ #define SPARC_FLAG_UNALIGNED 0x2 /* is allowed to do unaligned accesses */
+
+--- linux/include/asm-sparc/sigcontext.h.orig 2004-12-11 22:21:32.890748272 -0800
++++ linux/include/asm-sparc/sigcontext.h 2004-12-11 22:21:01.759480944 -0800
+@@ -4,7 +4,6 @@
+
+ #ifdef __KERNEL__
+ #include <asm/ptrace.h>
+-#endif
+
+ #ifndef __ASSEMBLY__
+
+@@ -57,8 +56,6 @@ typedef struct {
+ } si_fpqueue [16];
+ } __siginfo_fpu_t;
+
+-#ifdef __KERNEL__
+-
+ /* This magic should be in g_upper[0] for all upper parts
+ to be valid.
+ This is generated by sparc64 only, but for 32bit processes,
+@@ -69,8 +66,9 @@ typedef struct {
+ unsigned int o_upper[8];
+ } siginfo_extra_v8plus_t;
+
+-#endif
+-
+ #endif /* !(__ASSEMBLY__) */
+
++#endif /* (__KERNEL__) */
++
+ #endif /* !(__SPARC_SIGCONTEXT_H) */
++
+--- linux/include/asm-sparc/signal.h.orig 2004-12-11 22:21:32.891748120 -0800
++++ linux/include/asm-sparc/signal.h 2004-12-11 22:21:01.768479576 -0800
+@@ -3,6 +3,7 @@
+ #define _ASMSPARC_SIGNAL_H
+
+ #include <asm/sigcontext.h>
++#include <linux/compiler.h>
+
+ #ifdef __KERNEL__
+ #ifndef __ASSEMBLY__
+@@ -113,11 +114,14 @@ typedef struct {
+ unsigned long sig[_NSIG_WORDS];
+ } __new_sigset_t;
+
++
++#ifdef __KERNEL__
+ /* A SunOS sigstack */
+ struct sigstack {
+ char *the_stack;
+ int cur_status;
+ };
++#endif
+
+ /* Sigvec flags */
+ #define _SV_SSTACK 1u /* This signal handler should use sig-stack */
+@@ -191,6 +195,7 @@ typedef void (*__sighandler_t)(int);
+ #define SIG_IGN ((__sighandler_t)1) /* ignore signal */
+ #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
+
++#ifdef __KERNEL__
+ struct __new_sigaction {
+ __sighandler_t sa_handler;
+ unsigned long sa_flags;
+@@ -198,12 +203,10 @@ struct __new_sigaction {
+ __new_sigset_t sa_mask;
+ };
+
+-#ifdef __KERNEL__
+ struct k_sigaction {
+ struct __new_sigaction sa;
+ void __user *ka_restorer;
+ };
+-#endif
+
+ struct __old_sigaction {
+ __sighandler_t sa_handler;
+@@ -218,7 +221,6 @@ typedef struct sigaltstack {
+ size_t ss_size;
+ } stack_t;
+
+-#ifdef __KERNEL__
+ struct sparc_deliver_cookie {
+ int restart_syscall;
+ unsigned long orig_i0;