[lttng-dev] [PATCH lttng-modules 2/2] Fix compilation for 3.0 kernels that are named 2.6.40

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Fri Nov 23 18:12:22 EST 2012


* Simon Marchi (simon.marchi at polymtl.ca) wrote:
> Since some distro released the 3.0 kernel as 2.6.40, it might be useful
> to adjust some checks to treat 2.6.40 kernels as 3.0.

merged, thanks!

Mathieu

> 
> Signed-off-by: Simon Marchi <simon.marchi at polymtl.ca>
> ---
>  instrumentation/events/lttng-module/net.h |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/instrumentation/events/lttng-module/net.h b/instrumentation/events/lttng-module/net.h
> index a444b07..e552cf7 100644
> --- a/instrumentation/events/lttng-module/net.h
> +++ b/instrumentation/events/lttng-module/net.h
> @@ -12,7 +12,7 @@
>  
>  TRACE_EVENT(net_dev_xmit,
>  
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
>  	TP_PROTO(struct sk_buff *skb,
>  		 int rc,
>  		 struct net_device *dev,
> @@ -30,14 +30,14 @@ TRACE_EVENT(net_dev_xmit,
>  		__field(	void *,		skbaddr		)
>  		__field(	unsigned int,	len		)
>  		__field(	int,		rc		)
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
>  		__string(	name,		dev->name	)
>  #else
>  		__string(	name,		skb->dev->name	)
>  #endif
>  	),
>  
> -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0))
> +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
>  	TP_fast_assign(
>  		tp_assign(skbaddr, skb)
>  		tp_assign(len, skb_len)
> -- 
> 1.7.1
> 
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list