libs/libtasn1: fix installation issue. (closes #8165)
[openwrt/svn-archive/archive.git] / net / srelay / patches / 002-linux_2.6.19_rtnetlink_changes.patch
1 Index: srelay-0.4.6/get-bind.c
2 ===================================================================
3 --- srelay-0.4.6.orig/get-bind.c 2008-02-28 13:21:29.000000000 +0100
4 +++ srelay-0.4.6/get-bind.c 2008-02-28 13:21:30.000000000 +0100
5 @@ -50,6 +50,18 @@
6 #include <asm/types.h>
7 #include <linux/netlink.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 IFA_RTA
14 +# define IFA_RTA(r) ((struct rtattr *) ((char *)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg))))
15 +# define IFA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifaddrmsg))
16 +#endif
17 +#ifndef IFLA_RTA
18 +# define IFLA_RTA(r) ((struct rtattr *) ((char *)(r) + NLMSG_ALIGN (sizeof (struct ifinfomsg))))
19 +# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg))
20 +#endif
21
22 static int get_ifconf(int, struct addrinfo *);
23 #endif /* defined(LINUX) */