kni: fix build with kernel 3.8
authorIntel <intel.com>
Mon, 3 Jun 2013 00:00:00 +0000 (00:00 +0000)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 17 Sep 2013 12:16:08 +0000 (14:16 +0200)
- timecompare (used for hardware timestamping) has been removed.
(see Linux commit 65f8f9a1c1db831e5159e3e3e50912d1f214cd0c)
Simply disable HW_TIME_STAMP feature because it is not used by KNI.

- annotations __devinit and __devexit have been removed.
(see Linux commit 54b956b903607f8f8878754dd4352da6a54a1da2)

Signed-off-by: Intel
lib/librte_eal/linuxapp/kni/ethtool/igb/igb.h
lib/librte_eal/linuxapp/kni/ethtool/igb/kcompat.h

index 3cebff5..1fe7ee5 100644 (file)
@@ -44,6 +44,7 @@
 #include <linux/ethtool.h>
 #endif
 
+#undef HAVE_HW_TIME_STAMP
 #ifdef HAVE_HW_TIME_STAMP
 #include <linux/clocksource.h>
 #include <linux/timecompare.h>
index 553e1c0..7a36007 100644 (file)
@@ -955,6 +955,16 @@ struct vlan_ethhdr {
        #define __devexit_p(x) &(x)
 #endif
 
+#else
+       /* For Kernel 3.8 these are not defined - so undefine all */
+       #undef __devexit_p
+       #undef __devexit
+       #undef __devinit
+       #undef __devinitdata
+       #define __devexit_p(x) &(x)
+       #define __devexit
+       #define __devinit
+       #define __devinitdata
 #endif /* 2.4.17 => 2.4.13 */
 
 /*****************************************************************************/