Fix compilation for 3.0 kernels that are named 2.6.40
authorSimon Marchi <simon.marchi@polymtl.ca>
Fri, 23 Nov 2012 23:11:04 +0000 (18:11 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 23 Nov 2012 23:11:04 +0000 (18:11 -0500)
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 <simon.marchi@polymtl.ca>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
instrumentation/events/lttng-module/net.h

index a444b07a201059058a1da9c8c81f5804463871f2..e552cf7ba8a66487a49df424cb47af56e892b42c 100644 (file)
@@ -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)
This page took 0.026307 seconds and 4 git commands to generate.