]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
clone: Support bionic's clone() defintion
authorStéphane Graber <stgraber@ubuntu.com>
Thu, 3 Jan 2013 17:24:10 +0000 (12:24 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 9 Jan 2013 15:10:26 +0000 (10:10 -0500)
The clone() call in bionic is very slightly different.
This updates namespace.h to support both glibc and bionic.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
src/lxc/namespace.h

index 109e0bb97f13d501dddac008631f3936a9331064..e35de60bc82c62893a1afdde3c2d5234e72f9932 100644 (file)
@@ -26,6 +26,8 @@
 #include <sys/syscall.h>
 #include <sched.h>
 
+#include "config.h"
+
 #ifndef CLONE_FS
 #  define CLONE_FS                0x00000200
 #endif
 #ifndef CLONE_NEWNET
 #  define CLONE_NEWNET            0x40000000
 #endif
+#ifdef IS_BIONIC
+int clone(int (*fn)(void *), void *child_stack,
+       int flags, void *arg);
+#else
 int clone(int (*fn)(void *), void *child_stack,
        int flags, void *arg, ...
        /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */ );
+#endif
 
 
 extern pid_t lxc_clone(int (*fn)(void *), void *arg, int flags);