Skip to contentSkip to conversation

Fix compilation for 3.0 kernels that are named 2.6.40

PATCH Simon Marchi 1 participant 1 message Nov 23, 2012 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Please ignore, I sent only this one patch instead of the two I intended.

Quoted 41 lines · Simon Marchi

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.

---
 instrumentation/events/lttng-module/net.h |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
instrumentation/events/lttng-module/net.h +3 -4
index a444b07..e552cf7 100644
@@ -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