Martin Haaß
2006-11-10 09:27:29 UTC
Hi list,
while trying to compile the usb-rndis driver i found out the usb_cdc header
was moved from include/linux/ to include/linux/usb/
I believe the move happened with kernel release 2.6.18 but i' not sure. Anyway
here is a patch which conditionally changes the include:
diff -u usb-rndis/cdc_ether.c usb-rndis.neu/cdc_ether.c
--- usb-rndis/cdc_ether.c 2006-11-10 09:50:34.000000000 +0100
+++ usb-rndis.neu/cdc_ether.c 2006-11-10 09:47:56.000000000 +0100
@@ -32,7 +32,15 @@
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/usb.h>
-#include <linux/usb_cdc.h>
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ #include <linux/usb/cdc.h>
+#else
+ #include <linux/usb_cdc.h>
+#endif
+
+
#include "usbnet.h"
diff -u usb-rndis/rndis_host.c usb-rndis.neu/rndis_host.c
--- usb-rndis/rndis_host.c 2006-11-10 09:50:34.000000000 +0100
+++ usb-rndis.neu/rndis_host.c 2006-11-10 09:48:14.000000000 +0100
@@ -32,7 +32,13 @@
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/usb.h>
-#include <linux/usb_cdc.h>
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ #include <linux/usb/cdc.h>
+#else
+ #include <linux/usb_cdc.h>
+#endif
#include "ndis.h"
#include "usbnet.h"
Hope this helps
Martin
while trying to compile the usb-rndis driver i found out the usb_cdc header
was moved from include/linux/ to include/linux/usb/
I believe the move happened with kernel release 2.6.18 but i' not sure. Anyway
here is a patch which conditionally changes the include:
diff -u usb-rndis/cdc_ether.c usb-rndis.neu/cdc_ether.c
--- usb-rndis/cdc_ether.c 2006-11-10 09:50:34.000000000 +0100
+++ usb-rndis.neu/cdc_ether.c 2006-11-10 09:47:56.000000000 +0100
@@ -32,7 +32,15 @@
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/usb.h>
-#include <linux/usb_cdc.h>
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ #include <linux/usb/cdc.h>
+#else
+ #include <linux/usb_cdc.h>
+#endif
+
+
#include "usbnet.h"
diff -u usb-rndis/rndis_host.c usb-rndis.neu/rndis_host.c
--- usb-rndis/rndis_host.c 2006-11-10 09:50:34.000000000 +0100
+++ usb-rndis.neu/rndis_host.c 2006-11-10 09:48:14.000000000 +0100
@@ -32,7 +32,13 @@
#include <linux/workqueue.h>
#include <linux/mii.h>
#include <linux/usb.h>
-#include <linux/usb_cdc.h>
+
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+ #include <linux/usb/cdc.h>
+#else
+ #include <linux/usb_cdc.h>
+#endif
#include "ndis.h"
#include "usbnet.h"
Hope this helps
Martin