Commit 1f1665e6 by Stéphane Graber

clone: Support bionic's clone() defintion

The clone() call in bionic is very slightly different. This updates namespace.h to support both glibc and bionic. Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com> Acked-by: 's avatarSerge E. Hallyn <serge.hallyn@ubuntu.com>
parent 9818cae4
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <sys/syscall.h> #include <sys/syscall.h>
#include <sched.h> #include <sched.h>
#include "config.h"
#ifndef CLONE_FS #ifndef CLONE_FS
# define CLONE_FS 0x00000200 # define CLONE_FS 0x00000200
#endif #endif
...@@ -47,9 +49,14 @@ ...@@ -47,9 +49,14 @@
#ifndef CLONE_NEWNET #ifndef CLONE_NEWNET
# define CLONE_NEWNET 0x40000000 # define CLONE_NEWNET 0x40000000
#endif #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 clone(int (*fn)(void *), void *child_stack,
int flags, void *arg, ... int flags, void *arg, ...
/* pid_t *ptid, struct user_desc *tls, pid_t *ctid */ ); /* pid_t *ptid, struct user_desc *tls, pid_t *ctid */ );
#endif
extern pid_t lxc_clone(int (*fn)(void *), void *arg, int flags); extern pid_t lxc_clone(int (*fn)(void *), void *arg, int flags);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment