浏览代码

[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>
Paolo 'Blaisorblade' Giarrusso 18 年之前
父节点
当前提交
d875f9fd3f
共有 2 个文件被更改,包括 3 次插入4 次删除
  1. 3 3
      arch/um/kernel/tt/uaccess_user.c
  2. 0 1
      arch/um/os-Linux/tt.c

+ 3 - 3
arch/um/kernel/tt/uaccess_user.c

@@ -4,13 +4,13 @@
  * Licensed under the GPL
  * Licensed under the GPL
  */
  */
 
 
-#include <setjmp.h>
 #include <string.h>
 #include <string.h>
 #include "user_util.h"
 #include "user_util.h"
 #include "uml_uaccess.h"
 #include "uml_uaccess.h"
 #include "task.h"
 #include "task.h"
 #include "kern_util.h"
 #include "kern_util.h"
 #include "os.h"
 #include "os.h"
+#include "longjmp.h"
 
 
 int __do_copy_from_user(void *to, const void *from, int n,
 int __do_copy_from_user(void *to, const void *from, int n,
 			void **fault_addr, void **fault_catcher)
 			void **fault_addr, void **fault_catcher)
@@ -80,10 +80,10 @@ int __do_strnlen_user(const char *str, unsigned long n,
 	struct tt_regs save = TASK_REGS(get_current())->tt;
 	struct tt_regs save = TASK_REGS(get_current())->tt;
 	int ret;
 	int ret;
 	unsigned long *faddrp = (unsigned long *)fault_addr;
 	unsigned long *faddrp = (unsigned long *)fault_addr;
-	sigjmp_buf jbuf;
+	jmp_buf jbuf;
 
 
 	*fault_catcher = &jbuf;
 	*fault_catcher = &jbuf;
-	if(sigsetjmp(jbuf, 1) == 0)
+	if(UML_SETJMP(&jbuf) == 0)
 		ret = strlen(str) + 1;
 		ret = strlen(str) + 1;
 	else ret = *faddrp - (unsigned long) str;
 	else ret = *faddrp - (unsigned long) str;
 
 

+ 0 - 1
arch/um/os-Linux/tt.c

@@ -10,7 +10,6 @@
 #include <errno.h>
 #include <errno.h>
 #include <stdarg.h>
 #include <stdarg.h>
 #include <stdlib.h>
 #include <stdlib.h>
-#include <setjmp.h>
 #include <sys/time.h>
 #include <sys/time.h>
 #include <sys/ptrace.h>
 #include <sys/ptrace.h>
 #include <linux/ptrace.h>
 #include <linux/ptrace.h>