The ia64 linux kernel does not support the clone system call, it uses
clone2 instead.  Some recent tests were still using the clone system
call which prevented building the tests on ia64.  This patch conditionally
replaces them with clone2 calls on ia64.


Signed-off-by: Doug Chapman <[EMAIL PROTECTED]>



--- 
ltp-full-20070430/testcases/kernel/containers/utsname/check_utsns_enabled.c.clone_ia64_fix
  2007-05-09 16:18:24.000000000 -0400
+++ ltp-full-20070430/testcases/kernel/containers/utsname/check_utsns_enabled.c 
2007-05-09 16:37:16.000000000 -0400
@@ -62,7 +62,11 @@
 
        childstack = stack + getpagesize();
 
+#ifdef __ia64__
+       pid = clone2(dummy, childstack, getpagesize(), CLONE_NEWUTS, NULL, 
NULL, NULL, NULL);
+#else
        pid = clone(dummy, childstack, CLONE_NEWUTS, NULL);
+#endif
 
        if (pid == -1)
                return 3;
--- 
ltp-full-20070430/testcases/kernel/containers/libclone/libclone.h.clone_ia64_fix
    2007-05-09 16:26:20.000000000 -0400
+++ ltp-full-20070430/testcases/kernel/containers/libclone/libclone.h   
2007-05-09 16:35:26.000000000 -0400
@@ -35,6 +35,13 @@
 #endif
 #endif
 
+#ifdef __ia64__
+#define clone2 __clone2
+extern int  __clone2(int (*fn) (void *arg), void *child_stack_base,
+                size_t child_stack_size, int flags, void *arg,
+                pid_t *parent_tid, void *tls, pid_t *child_tid);
+#endif
+
 #ifndef CLONE_NEWUTS
 #define CLONE_NEWUTS           0x04000000
 #endif
--- 
ltp-full-20070430/testcases/kernel/containers/libclone/libclone.c.clone_ia64_fix
    2007-04-26 07:02:51.000000000 -0400
+++ ltp-full-20070430/testcases/kernel/containers/libclone/libclone.c   
2007-05-09 16:36:22.000000000 -0400
@@ -16,7 +16,12 @@
 
        childstack = stack + getpagesize();
 
+#ifdef __ia64__
+       ret = clone2(fn1, childstack, getpagesize(), clone_flags | SIGCHLD, 
arg1, NULL, NULL, NULL);
+#else
        ret = clone(fn1, childstack, clone_flags | SIGCHLD, arg1);
+#endif
+
        if (ret == -1) {
                perror("clone");
                free(stack);



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to