commit d3a73e2f074fa6c9cc11da0aee494a5eae92392d Author: Julien Desfossez Date: Tue Sep 30 13:41:34 2014 -0400 Fix: detect ubuntu kernel for task_nsproxy Fixes this compilation error on Ubuntu kernel : lttng-statedump-impl.c: In function ‘lttng_statedump_process_ns’: lttng-statedump-impl.c:417:2: error: implicit declaration of function ‘task_nsproxy’ [-Werror=implicit-function-declaration] proxy = task_nsproxy(p); ^ lttng-statedump-impl.c:417:8: warning: assignment makes pointer from integer without a cast [enabled by default] proxy = task_nsproxy(p); Signed-off-by: Julien Desfossez diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c index 656cebb..17fa2cc 100644 --- a/lttng-statedump-impl.c +++ b/lttng-statedump-impl.c @@ -46,6 +46,7 @@ #include #include #include +#include #include "lttng-events.h" #include "lttng-tracer.h" @@ -411,7 +412,7 @@ void lttng_statedump_process_ns(struct lttng_session *session, * "namespaces: Use task_lock and not rcu to protect nsproxy" * for details. */ -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) && !defined(UTS_UBUNTU_RELEASE_ABI)) rcu_read_lock(); proxy = task_nsproxy(p); #else /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ @@ -428,7 +429,7 @@ void lttng_statedump_process_ns(struct lttng_session *session, trace_lttng_statedump_process_state(session, p, type, mode, submode, status, NULL); } -#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) && !defined(UTS_UBUNTU_RELEASE_ABI)) rcu_read_unlock(); #endif /* #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0)) */ }