fix compile issues, from http://bugs.xelerance.com/view.php?id=509
[openwrt/svn-archive/archive.git] / openwrt / target / linux / package / openswan / patches / fix-compile-2.4.14-changes.patch
1 diff -Nur openswan-2.4.4/linux/net/ipsec/ipcomp.c openswan-2.4.4.patched/linux/net/ipsec/ipcomp.c
2 --- openswan-2.4.4/linux/net/ipsec/ipcomp.c 2005-08-28 01:40:00.000000000 +0200
3 +++ openswan-2.4.4.patched/linux/net/ipsec/ipcomp.c 2005-12-18 17:46:02.069886000 +0100
4 @@ -600,7 +600,6 @@
5 memcpy(n->head,
6 skb->head,
7 ((char *)iph - (char *)skb->head) + iphlen);
8 - n->list=NULL;
9 n->next=NULL;
10 n->prev=NULL;
11 n->sk=NULL;
12 @@ -657,7 +656,7 @@
13 n->pkt_bridged=skb->pkt_bridged;
14 #endif /* NETDEV_23 */
15 n->ip_summed=0;
16 - n->stamp=skb->stamp;
17 + n->tstamp=skb->tstamp;
18 #ifndef NETDEV_23 /* this seems to have been removed in 2.4 */
19 #if defined(CONFIG_SHAPER) || defined(CONFIG_SHAPER_MODULE)
20 n->shapelatency=skb->shapelatency; /* Latency on frame */
21 diff -Nur openswan-2.4.4/linux/net/ipsec/ipsec_tunnel.c openswan-2.4.4.patched/linux/net/ipsec/ipsec_tunnel.c
22 --- openswan-2.4.4/linux/net/ipsec/ipsec_tunnel.c 2005-09-22 00:57:43.000000000 +0200
23 +++ openswan-2.4.4.patched/linux/net/ipsec/ipsec_tunnel.c 2005-12-18 17:46:02.069886000 +0100
24 @@ -34,6 +34,7 @@
25 #include <linux/interrupt.h> /* mark_bh */
26
27 #include <net/tcp.h>
28 +#include <net/inet_timewait_sock.h>
29 #include <net/udp.h>
30 #include <linux/skbuff.h>
31
32 @@ -272,9 +273,9 @@
33
34 if(ixs->skb->sk) {
35 #ifdef NET_26
36 - struct tcp_tw_bucket *tw;
37 + struct inet_timewait_sock *tw;
38
39 - tw = (struct tcp_tw_bucket *)ixs->skb->sk;
40 + tw = (struct inet_timewait_sock *)ixs->skb->sk;
41
42 ixs->sport = ntohs(tw->tw_sport);
43 ixs->dport = ntohs(tw->tw_dport);
44 diff -Nur openswan-2.4.4/linux/net/ipsec/pfkey_v2.c openswan-2.4.4.patched/linux/net/ipsec/pfkey_v2.c
45 --- openswan-2.4.4/linux/net/ipsec/pfkey_v2.c 2005-09-14 18:40:45.000000000 +0200
46 +++ openswan-2.4.4.patched/linux/net/ipsec/pfkey_v2.c 2005-12-18 18:06:21.826116000 +0100
47 @@ -461,9 +461,8 @@
48 "pfkey_skb contents:");
49 printk(" next:0p%p", skb->next);
50 printk(" prev:0p%p", skb->prev);
51 - printk(" list:0p%p", skb->list);
52 printk(" sk:0p%p", skb->sk);
53 - printk(" stamp:%ld.%ld", skb->stamp.tv_sec, skb->stamp.tv_usec);
54 + printk(" tstamp:%d.%d", skb->tstamp.off_sec, skb->tstamp.off_usec);
55 printk(" dev:0p%p", skb->dev);
56 if(skb->dev) {
57 if(skb->dev->name) {
58 @@ -1376,7 +1375,8 @@
59 #endif /* NET_21 */
60
61 skb_copy_datagram_iovec(skb, 0, msg->msg_iov, size);
62 - sk->sk_stamp=skb->stamp;
63 + sk->sk_stamp.tv_sec=skb->tstamp.off_sec;
64 + sk->sk_stamp.tv_usec=skb->tstamp.off_usec;
65
66 skb_free_datagram(sk, skb);
67 return size;
68 @@ -1495,8 +1495,8 @@
69 #endif
70 sk->sk_protocol,
71 sk->sk_sndbuf,
72 - (unsigned int)sk->sk_stamp.tv_sec,
73 - (unsigned int)sk->sk_stamp.tv_usec,
74 + sk->sk_stamp.tv_sec,
75 + sk->sk_stamp.tv_usec,
76 sk->sk_socket->flags,
77 sk->sk_socket->type,
78 sk->sk_socket->state);