[RTnet-developers] [PATCH] Build fixes for 2.6.36
Brought to you by:
bet-frogger,
kiszka
|
From: Wolfgang G. <wg...@gr...> - 2011-02-09 11:22:27
|
Signed-off-by: Wolfgang Grandegger <wg...@de...>
---
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
|