http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=580015
Define clone2 and use it instead of clone on ia64 only
Patch by Anibal Monsalve Salazar <anibal@debian.org>
--- a/sutil/ncpumount.c 2010-06-08 19:01:17.000000000 +1000
+++ b/sutil/ncpumount.c 2010-06-08 18:50:18.000000000 +1000
@@ -83,6 +83,13 @@
#define MS_SLAVE (1<<19)
#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
+
static char *progname;
static int is_ncplogout = 0;
@@ -350,7 +357,12 @@ static int check_is_mount(const char *la
int status;
const char *a[2] = { last, mnt };
+#ifdef __ia64__
+ pid = clone2(check_is_mount_child, buf + 65536, getpagesize(), CLONE_NEWNS, (void *) a,
+ NULL, NULL, NULL);
+#else
pid = clone(check_is_mount_child, buf + 65536, CLONE_NEWNS, (void *) a);
+#endif
if (pid == (pid_t) -1) {
eprintf(_("Failed to clone namespace: %s\n"),
strerror(errno));