From: Christian Babeux Date: Thu, 29 Nov 2012 16:13:48 +0000 (-0500) Subject: Cygwin: Add clone compat layer X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8d804f736eb06e892e74f32df00ea0bdb974a410;p=lttng-tools.git Cygwin: Add clone compat layer Cygwin doesn't support the clone() syscall [1]. Users must explicitly set the LTTNG_DEBUG_NOCLONE environment variable. [1] - http://cygwin.com/ml/cygwin/2009-05/msg00172.html Signed-off-by: Christian Babeux --- diff --git a/src/common/compat/clone.h b/src/common/compat/clone.h index 581595be0..13e88d418 100644 --- a/src/common/compat/clone.h +++ b/src/common/compat/clone.h @@ -56,8 +56,19 @@ pid_t lttng_clone_files(int (*fn)(void *), void *child_stack, void *arg) } } +#elif defined(__CYGWIN__) +#warning "Cygwin doesn't support the clone() syscall. You must set the LTTNG_DEBUG_NOCLONE=1 before starting lttng-sessiond" +#include + +static inline +pid_t lttng_clone_files(int (*fn)(void *), void *child_stack, void *arg) +{ + assert(NULL); + return -1; +} + #else #error "Please add support for your OS." -#endif /* __linux__ , __FreeBSD__ */ +#endif /* __linux__ , __FreeBSD__, __CYGWIN__ */ #endif /* _COMPAT_CLONE_H */