diff options
author | Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> | 2006-10-11 04:21:34 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-11 14:14:20 -0400 |
commit | d875f9fd3f2369bf6f4d0e9989f00fe610eac470 (patch) | |
tree | 6a75e68d2fe1f4429237be689d9889cde2974501 | |
parent | e27e80b3da7ad6b90185bd689879888907104a40 (diff) |
[PATCH] uml: make TT mode compile after setjmp-related changes
Make TT mode compile after the introduction of klibc's implementation of
setjmp.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/um/kernel/tt/uaccess_user.c | 6 | ||||
-rw-r--r-- | arch/um/os-Linux/tt.c | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/arch/um/kernel/tt/uaccess_user.c b/arch/um/kernel/tt/uaccess_user.c index 6c92bbccb49c..ed1abcf4d057 100644 --- a/arch/um/kernel/tt/uaccess_user.c +++ b/arch/um/kernel/tt/uaccess_user.c | |||
@@ -4,13 +4,13 @@ | |||
4 | * Licensed under the GPL | 4 | * Licensed under the GPL |
5 | */ | 5 | */ |
6 | 6 | ||
7 | #include <setjmp.h> | ||
8 | #include <string.h> | 7 | #include <string.h> |
9 | #include "user_util.h" | 8 | #include "user_util.h" |
10 | #include "uml_uaccess.h" | 9 | #include "uml_uaccess.h" |
11 | #include "task.h" | 10 | #include "task.h" |
12 | #include "kern_util.h" | 11 | #include "kern_util.h" |
13 | #include "os.h" | 12 | #include "os.h" |
13 | #include "longjmp.h" | ||
14 | 14 | ||
15 | int __do_copy_from_user(void *to, const void *from, int n, | 15 | int __do_copy_from_user(void *to, const void *from, int n, |
16 | void **fault_addr, void **fault_catcher) | 16 | void **fault_addr, void **fault_catcher) |
@@ -80,10 +80,10 @@ int __do_strnlen_user(const char *str, unsigned long n, | |||
80 | struct tt_regs save = TASK_REGS(get_current())->tt; | 80 | struct tt_regs save = TASK_REGS(get_current())->tt; |
81 | int ret; | 81 | int ret; |
82 | unsigned long *faddrp = (unsigned long *)fault_addr; | 82 | unsigned long *faddrp = (unsigned long *)fault_addr; |
83 | sigjmp_buf jbuf; | 83 | jmp_buf jbuf; |
84 | 84 | ||
85 | *fault_catcher = &jbuf; | 85 | *fault_catcher = &jbuf; |
86 | if(sigsetjmp(jbuf, 1) == 0) | 86 | if(UML_SETJMP(&jbuf) == 0) |
87 | ret = strlen(str) + 1; | 87 | ret = strlen(str) + 1; |
88 | else ret = *faddrp - (unsigned long) str; | 88 | else ret = *faddrp - (unsigned long) str; |
89 | 89 | ||
diff --git a/arch/um/os-Linux/tt.c b/arch/um/os-Linux/tt.c index 5461a065bbb9..3dc3a02d6263 100644 --- a/arch/um/os-Linux/tt.c +++ b/arch/um/os-Linux/tt.c | |||
@@ -10,7 +10,6 @@ | |||
10 | #include <errno.h> | 10 | #include <errno.h> |
11 | #include <stdarg.h> | 11 | #include <stdarg.h> |
12 | #include <stdlib.h> | 12 | #include <stdlib.h> |
13 | #include <setjmp.h> | ||
14 | #include <sys/time.h> | 13 | #include <sys/time.h> |
15 | #include <sys/ptrace.h> | 14 | #include <sys/ptrace.h> |
16 | #include <linux/ptrace.h> | 15 | #include <linux/ptrace.h> |