Signed-off-by: Wolfgang Grandegger <[email protected]>
---
 stack/include/rtnet_port.h |    9 +++++++++
 stack/ipv4/route.c         |    1 +
 stack/rtcfg/rtcfg_proc.c   |    1 +
 stack/rtnet_chrdev.c       |    9 +++++++++
 4 files changed, 20 insertions(+), 0 deletions(-)

diff --git a/stack/include/rtnet_port.h b/stack/include/rtnet_port.h
index b47c0db..09101cc 100644
--- a/stack/include/rtnet_port.h
+++ b/stack/include/rtnet_port.h
@@ -213,6 +213,15 @@ static inline void *netdev_priv(struct net_device *dev)
 #define DMA_BIT_MASK(n)        (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
 #endif
 
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35)
+#define NIPQUAD(addr) \
+        ((unsigned char *)&addr)[0],   \
+       ((unsigned char *)&addr)[1],    \
+       ((unsigned char *)&addr)[2],    \
+       ((unsigned char *)&addr)[3]
+#define NIPQUAD_FMT "%u.%u.%u.%u"
+#endif
+
 #endif /* __KERNEL__ */
 
 #endif /* __RTNET_PORT_H_ */
diff --git a/stack/ipv4/route.c b/stack/ipv4/route.c
index 2151686..505b32e 100644
--- a/stack/ipv4/route.c
+++ b/stack/ipv4/route.c
@@ -26,6 +26,7 @@
 #include <net/ip.h>
 
 #include <rtnet_internal.h>
+#include <rtnet_port.h>
 #include <rtnet_chrdev.h>
 #include <ipv4/af_inet.h>
 #include <ipv4/route.h>
diff --git a/stack/rtcfg/rtcfg_proc.c b/stack/rtcfg/rtcfg_proc.c
index 3d55d50..93aafd8 100644
--- a/stack/rtcfg/rtcfg_proc.c
+++ b/stack/rtcfg/rtcfg_proc.c
@@ -24,6 +24,7 @@
 
 #include <rtdev.h>
 #include <rtnet_internal.h>
+#include <rtnet_port.h>
 #include <rtcfg/rtcfg_conn_event.h>
 #include <rtcfg/rtcfg_event.h>
 #include <rtcfg/rtcfg_frame.h>
diff --git a/stack/rtnet_chrdev.c b/stack/rtnet_chrdev.c
index b0f2863..0d3fae3 100644
--- a/stack/rtnet_chrdev.c
+++ b/stack/rtnet_chrdev.c
@@ -47,8 +47,13 @@ LIST_HEAD(ioctl_handlers);
  * @request:
  * @arg:
  */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35)
+static long rtnet_ioctl(struct file *file,
+                       unsigned int request, unsigned long arg)
+#else
 static int rtnet_ioctl(struct inode *inode, struct file *file,
                        unsigned int request, unsigned long arg)
+#endif
 {
     struct rtnet_ioctl_head head;
     struct rtnet_device     *rtdev = NULL;
@@ -286,7 +291,11 @@ void rtnet_unregister_ioctls(struct rtnet_ioctls *ioctls)
 
 
 static struct file_operations rtnet_fops = {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,35)
+    .unlocked_ioctl = rtnet_ioctl,
+#else
     .ioctl= rtnet_ioctl,
+#endif
 };
 
 static struct miscdevice rtnet_chr_misc_dev = {
-- 
1.7.2.3


------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
RTnet-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rtnet-developers

Reply via email to