[Pkg-uml-commit] r225 - trunk/src/user-mode-linux/debian/patches

Mattia Dongili malattia at costa.debian.org
Tue Oct 3 18:39:06 UTC 2006


Author: malattia
Date: 2006-10-03 18:39:06 +0000 (Tue, 03 Oct 2006)
New Revision: 225

Added:
   trunk/src/user-mode-linux/debian/patches/04_no-syscallx
Modified:
   trunk/src/user-mode-linux/debian/patches/00list
Log:
fix build failure for the UML kernel

Modified: trunk/src/user-mode-linux/debian/patches/00list
===================================================================
--- trunk/src/user-mode-linux/debian/patches/00list	2006-10-03 18:34:26 UTC (rev 224)
+++ trunk/src/user-mode-linux/debian/patches/00list	2006-10-03 18:39:06 UTC (rev 225)
@@ -1,2 +1,3 @@
 02_x-terminal-emulator.dpatch
 03_uml_switch.diff
+04_no-syscallx

Added: trunk/src/user-mode-linux/debian/patches/04_no-syscallx
===================================================================
--- trunk/src/user-mode-linux/debian/patches/04_no-syscallx	                        (rev 0)
+++ trunk/src/user-mode-linux/debian/patches/04_no-syscallx	2006-10-03 18:39:06 UTC (rev 225)
@@ -0,0 +1,82 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_no-syscallx
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Use Debian's standard location for uml_net helper
+
+ at DPATCH@
+
+# Author: malattia
+# Status: none
+
+# Since the syscallx macros seem to be under threat, this patch stops
+# using them, using syscall instead.
+
+Index: linux-2.6.17/arch/um/os-Linux/process.c
+===================================================================
+--- linux-2.6.17.orig/arch/um/os-Linux/process.c	2006-09-20 11:15:08.000000000 -0400
++++ linux-2.6.17/arch/um/os-Linux/process.c	2006-09-20 13:35:24.000000000 -0400
+@@ -140,11 +140,9 @@ void os_usr1_process(int pid)
+  * syscalls, and also breaks with clone(), which does not unshare the TLS.
+  */
+ 
+-inline _syscall0(pid_t, getpid)
+-
+ int os_getpid(void)
+ {
+-	return(getpid());
++	return syscall(__NR_getpid);
+ }
+ 
+ int os_getpgrp(void)
+Index: linux-2.6.17/arch/um/os-Linux/sys-i386/tls.c
+===================================================================
+--- linux-2.6.17.orig/arch/um/os-Linux/sys-i386/tls.c	2006-06-18 13:49:35.000000000 -0400
++++ linux-2.6.17/arch/um/os-Linux/sys-i386/tls.c	2006-09-20 13:37:27.000000000 -0400
+@@ -3,8 +3,6 @@
+ #include "sysdep/tls.h"
+ #include "user_util.h"
+ 
+-static _syscall1(int, get_thread_area, user_desc_t *, u_info);
+-
+ /* Checks whether host supports TLS, and sets *tls_min according to the value
+  * valid on the host.
+  * i386 host have it == 6; x86_64 host have it == 12, for i386 emulation. */
+@@ -17,7 +15,7 @@ void check_host_supports_tls(int *suppor
+ 		user_desc_t info;
+ 		info.entry_number = val[i];
+ 
+-		if (get_thread_area(&info) == 0) {
++		if(syscall(__NR_get_thread_area, &info) == 0){
+ 			*tls_min = val[i];
+ 			*supports_tls = 1;
+ 			return;
+Index: linux-2.6.17/arch/um/os-Linux/tls.c
+===================================================================
+--- linux-2.6.17.orig/arch/um/os-Linux/tls.c	2006-08-15 21:59:56.000000000 -0400
++++ linux-2.6.17/arch/um/os-Linux/tls.c	2006-09-20 13:37:14.000000000 -0400
+@@ -48,14 +48,11 @@ int os_get_thread_area(user_desc_t *info
+ #ifdef UML_CONFIG_MODE_TT
+ #include "linux/unistd.h"
+ 
+-static _syscall1(int, get_thread_area, user_desc_t *, u_info);
+-static _syscall1(int, set_thread_area, user_desc_t *, u_info);
+-
+ int do_set_thread_area_tt(user_desc_t *info)
+ {
+ 	int ret;
+ 
+-	ret = set_thread_area(info);
++	ret = syscall(__NR_set_thread_area, info);
+ 	if (ret < 0) {
+ 		ret = -errno;
+ 	}
+@@ -66,7 +63,7 @@ int do_get_thread_area_tt(user_desc_t *i
+ {
+ 	int ret;
+ 
+-	ret = get_thread_area(info);
++	ret = syscall(__NR_get_thread_area, info);
+ 	if (ret < 0) {
+ 		ret = -errno;
+ 	}




More information about the Pkg-uml-commit mailing list