I was even looking for this. Thanks Li for providing this patch. Applied
and tested.

Regards--
Subrata

On Fri, 2008-06-06 at 16:29 +0800, Li Zefan wrote:
> On ia64, __clone2() is used instead of clone().
> 
> Signed-off-by: Li Zefan <[EMAIL PROTECTED]>
> ---
>  nsclone.c |   14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff -Nurp ltp-full-20080531.orig/testcases/kernel/fs/fs_bind/bin/nsclone.c 
> ltp-full-20080531/testcases/kernel/fs/fs_bind/bin/nsclone.c
> --- ltp-full-20080531.orig/testcases/kernel/fs/fs_bind/bin/nsclone.c  
> 2008-05-13 18:44:03.000000000 +0800
> +++ ltp-full-20080531/testcases/kernel/fs/fs_bind/bin/nsclone.c       
> 2008-06-06 16:24:19.000000000 +0800
> @@ -25,6 +25,13 @@
>  #include <sys/types.h>
>  #include <sys/wait.h>
> 
> +#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
> +
>  char somemem[4096];
> 
>  int myfunc(void *arg){
> @@ -52,7 +59,12 @@ int main(int argc, char *argv[])
>       parent_cmd = (char *)strdup(argv[1]);
> 
>       printf("1\n");
> -     if(clone(myfunc, somemem, CLONE_NEWNS|SIGCHLD, child_cmd) != -1) {
> +#ifdef __ia64__
> +     if (clone2(myfunc, somemem, getpagesize(), CLONE_NEWNS|SIGCHLD,
> +                child_cmd, NULL, NULL, NULL) != -1) {
> +#else
> +     if (clone(myfunc, somemem, CLONE_NEWNS|SIGCHLD, child_cmd) != -1) {
> +#endif
>               system(parent_cmd);
>               wait(&childret);
>       } else {


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to