From f95480cf62e9acb42b74fce162544694b76c9704 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 23 Nov 2012 18:11:04 -0500 Subject: [PATCH] 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 --- instrumentation/events/lttng-module/net.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.34.1