Skip to contentSkip to conversation

UML - Don't use __NR_waitpid on arches which don't have it

PATCH New Jeff Dike 1 participant 1 message Jan 10, 2005 User-mode Linux (UML)

lore
Share & tools
lore

Jeff Dike

author
#0 lore raw

PATCH 14/28 UML - Don't use __NR_waitpid on arches which don't have it

From: Bodo Stroesser <[email protected]>

Some architectures (e.g. s390) don't have __NR_waitpid. Thus, it must not be used in arch/um/kernel/tt/ptproxy/proxy.c

arch/um/kernel/tt/ptproxy/proxy.c renamed from arch/um/kernel/tt/ptproxy/proxy.c~no-__NR_waitpid +7 -1
diff -puN arch/um/kernel/tt/ptproxy/proxy.c~no-__NR_waitpid arch/um/kernel/tt/ptproxy/proxy.c
@@ -94,7 +94,9 @@ int debugger_syscall(debugger_state *deb
 		debugger->handle_trace = debugger_syscall;
 		return(ret);
 
+#ifdef __NR_waitpid
 	case __NR_waitpid:
+#endif
 	case __NR_wait4:
 		if(!debugger_wait(debugger, (int *) arg2, arg3, 
 				  debugger_syscall, debugger_normal_return, 
@@ -153,7 +155,11 @@ static int parent_syscall(debugger_state
 
 	syscall = get_syscall(pid, &arg1, &arg2, &arg3, &arg4, &arg5);
 		
-	if((syscall == __NR_waitpid) || (syscall == __NR_wait4)){
+	if((syscall == __NR_wait4)
+#ifdef __NR_waitpid
+	   || (syscall == __NR_waitpid)
+#endif
+	){
 		debugger_wait(&parent, (int *) arg2, arg3, parent_syscall,
 			      parent_normal_return, parent_wait_return);
 	}

_