packages/net/ipsec-tools/patches/003-linux_2.6.19_rtnetlink_changes.diff
nico 23a3c3ed1d [packages] ipsec-tools: update to v0.7.2
git-svn-id: svn://svn.openwrt.org/openwrt/packages@16011 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-05-23 03:51:45 +00:00

21 lines
513 B
Diff

--- a/src/racoon/grabmyaddr.c
+++ b/src/racoon/grabmyaddr.c
@@ -80,10 +80,17 @@
#ifdef __linux__
#include <linux/types.h>
#include <linux/rtnetlink.h>
+#include <linux/version.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
+# include <linux/if_addr.h>
+#endif
#ifndef HAVE_GETIFADDRS
#define HAVE_GETIFADDRS
#define NEED_LINUX_GETIFADDRS
#endif
+#ifndef IFA_RTA
+# define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
+#endif
#endif
#ifndef HAVE_GETIFADDRS