[lxc-devel] [PATCH 09/21] clone: Support bionic's clone() defintion

Serge Hallyn serge.hallyn at canonical.com
Thu Jan 3 18:06:20 UTC 2013


Quoting Stéphane Graber (stgraber at ubuntu.com):
> 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 at ubuntu.com>

Acked-by: Serge E. Hallyn <serge.hallyn at ubuntu.com>

> ---
>  src/lxc/namespace.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/src/lxc/namespace.h b/src/lxc/namespace.h
> index 109e0bb..e35de60 100644
> --- a/src/lxc/namespace.h
> +++ b/src/lxc/namespace.h
> @@ -26,6 +26,8 @@
>  #include <sys/syscall.h>
>  #include <sched.h>
>  
> +#include "config.h"
> +
>  #ifndef CLONE_FS
>  #  define CLONE_FS                0x00000200
>  #endif
> @@ -47,9 +49,14 @@
>  #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);
> -- 
> 1.8.0
> 
> 
> ------------------------------------------------------------------------------
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> _______________________________________________
> Lxc-devel mailing list
> Lxc-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-devel




More information about the lxc-devel mailing list