fix pmacct (closes: #1233)
[openwrt/svn-archive/archive.git] / ipv6 / mrd6 / patches / 002-missing_netlink_defs.patch
1 diff -urN mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h mrd6-0.9.5.new/include/mrdpriv/linux/netlink_missing_defs.h
2 --- mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h 1970-01-01 01:00:00.000000000 +0100
3 +++ mrd6-0.9.5.new/include/mrdpriv/linux/netlink_missing_defs.h 2007-01-11 12:26:55.000000000 +0100
4 @@ -0,0 +1,41 @@
5 +#include <linux/version.h>
6 +
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
8 +
9 +#include <linux/if_link.h>
10 +#include <linux/if_addr.h>
11 +#include <linux/neighbour.h>
12 +
13 +#ifndef IFA_RTA
14 +#define IFA_RTA(r) \
15 + ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg))))
16 +#endif
17 +#ifndef IFA_PAYLOAD
18 +#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg))
19 +#endif
20 +
21 +#ifndef IFLA_RTA
22 +#define IFLA_RTA(r) \
23 + ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg))))
24 +#endif
25 +#ifndef IFLA_PAYLOAD
26 +#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg))
27 +#endif
28 +
29 +#ifndef NDA_RTA
30 +#define NDA_RTA(r) \
31 + ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg))))
32 +#endif
33 +#ifndef NDA_PAYLOAD
34 +#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg))
35 +#endif
36 +
37 +#ifndef NDTA_RTA
38 +#define NDTA_RTA(r) \
39 + ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg))))
40 +#endif
41 +#ifndef NDTA_PAYLOAD
42 +#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg))
43 +#endif
44 +
45 +#endif
46 diff -urN mrd6-0.9.5/src/linux/linux_unicast_route.cpp mrd6-0.9.5.new/src/linux/linux_unicast_route.cpp
47 --- mrd6-0.9.5/src/linux/linux_unicast_route.cpp 2006-01-06 00:08:02.000000000 +0100
48 +++ mrd6-0.9.5.new/src/linux/linux_unicast_route.cpp 2007-01-11 12:24:08.000000000 +0100
49 @@ -22,6 +22,7 @@
50 */
51
52 #include <mrdpriv/linux/unicast_route.h>
53 +#include <mrdpriv/linux/netlink_missing_defs.h>
54
55 #include <mrd/mrd.h>
56 #include <mrd/interface.h>