projects
/
swifty.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix compilation for kernel versions older than 2.6.36
[swifty.git]
/
src
/
kernel
/
swift.c
diff --git
a/src/kernel/swift.c
b/src/kernel/swift.c
index
1a7e164
..
b3aa899
100644
(file)
--- a/
src/kernel/swift.c
+++ b/
src/kernel/swift.c
@@
-1,4
+1,5
@@
#include <linux/module.h>
#include <linux/module.h>
+#include <linux/version.h>
#include <net/sock.h>
#include <net/protocol.h>
#include <net/ip.h>
#include <net/sock.h>
#include <net/protocol.h>
#include <net/ip.h>
@@
-310,7
+311,11
@@
static int swift_sendmsg(struct kiocb *iocb, struct socket *sock, struct msghdr
log_error("Route lookup failed\n");
goto out_free;
}
log_error("Route lookup failed\n");
goto out_free;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 36)
+ sk_dst_set(sk, dst_clone(&rt->u.dst));
+#else
sk_dst_set(sk, dst_clone(&rt->dst));
sk_dst_set(sk, dst_clone(&rt->dst));
+#endif
}
err = ip_queue_xmit(skb);
}
err = ip_queue_xmit(skb);