Add missing definitions, prevented users of Fedora Core 5 (and probably others) to...
[openwrt.git] / target / linux / uml-2.6 / patches / 02-missing_definitions.patch
1 # Newer libcs don't define the JB_* jmp_buf access macros.  If this is
2 # the case, we provide values ourselves.
3 Index: linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c
4 ===================================================================
5 --- linux-2.6.15.orig/arch/um/os-Linux/sys-i386/registers.c     2006-02-13 13:00:06.000000000 -0500
6 +++ linux-2.6.15/arch/um/os-Linux/sys-i386/registers.c  2006-02-13 13:04:07.000000000 -0500
7 @@ -130,6 +130,12 @@ void get_safe_registers(unsigned long *r
8                        HOST_FP_SIZE * sizeof(unsigned long));
9  }
10  
11 +#ifndef JB_PC
12 +#define JB_PC 5
13 +#define JB_SP 4
14 +#define JB_BP 3
15 +#endif
16 +
17  void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
18  {
19         struct __jmp_buf_tag *jmpbuf = buffer;
20 Index: linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c
21 ===================================================================
22 --- linux-2.6.15.orig/arch/um/os-Linux/sys-x86_64/registers.c   2006-02-13 13:00:06.000000000 -0500
23 +++ linux-2.6.15/arch/um/os-Linux/sys-x86_64/registers.c        2006-02-13 13:04:07.000000000 -0500
24 @@ -78,6 +78,12 @@ void get_safe_registers(unsigned long *r
25                        HOST_FP_SIZE * sizeof(unsigned long));
26  }
27  
28 +#ifndef JB_PC
29 +#define JB_PC 7
30 +#define JB_RSP 6
31 +#define JB_RBP 1
32 +#endif
33 +
34  void get_thread_regs(union uml_pt_regs *uml_regs, void *buffer)
35  {
36         struct __jmp_buf_tag *jmpbuf = buffer;
37