projects
/
swifty.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c3020b9
)
Fix compilation for kernel versions older than 2.6.36
author
Adrian Bondrescu
<adi.bondrescu@gmail.com>
Sun, 5 Jun 2011 13:00:39 +0000
(16:00 +0300)
committer
Razvan Deaconescu
<razvan.deaconescu@cs.pub.ro>
Mon, 18 Mar 2013 16:26:51 +0000
(18:26 +0200)
src/kernel/swift.c
patch
|
blob
|
history
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/version.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;
}
+#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));
+#endif
}
err = ip_queue_xmit(skb);