52d092e6ce97be23f2e09933c287e17cdd45bd9c
[openwrt/svn-archive/archive.git] / net / ipsec-tools / patches / 003-linux_2.6.19_rtnetlink_changes.diff
1 Index: ipsec-tools-0.6.6/src/racoon/grabmyaddr.c
2 ===================================================================
3 --- ipsec-tools-0.6.6.orig/src/racoon/grabmyaddr.c 2007-06-04 13:22:36.521303200 +0200
4 +++ ipsec-tools-0.6.6/src/racoon/grabmyaddr.c 2007-06-04 13:22:37.064220664 +0200
5 @@ -77,10 +77,17 @@
6 #ifdef __linux__
7 #include <linux/types.h>
8 #include <linux/rtnetlink.h>
9 +#include <linux/version.h>
10 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
11 +# include <linux/if_addr.h>
12 +#endif
13 #ifndef HAVE_GETIFADDRS
14 #define HAVE_GETIFADDRS
15 #define NEED_LINUX_GETIFADDRS
16 #endif
17 +#ifndef IFA_RTA
18 +# define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
19 +#endif
20 #endif
21
22 #ifndef HAVE_GETIFADDRS