From: Simon Marchi Date: Fri, 23 Nov 2012 23:11:04 +0000 (-0500) Subject: Fix compilation for 3.0 kernels that are named 2.6.40 X-Git-Tag: v2.2.0-rc1~35 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f95480cf62e9acb42b74fce162544694b76c9704;p=lttng-modules.git Fix compilation for 3.0 kernels that are named 2.6.40 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. Signed-off-by: Simon Marchi Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/lttng-module/net.h b/instrumentation/events/lttng-module/net.h index a444b07a..e552cf7b 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)