From: Florian Fainelli Date: Thu, 11 Jan 2007 11:30:38 +0000 (+0000) Subject: Fix mrd6 compilation when netlink macros are disabled X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=07c0b1e70449b04676ecdbfa9ac6e632e689b988;p=openwrt%2Fsvn-archive%2Fpackages.git Fix mrd6 compilation when netlink macros are disabled SVN-Revision: 6075 --- diff --git a/ipv6/mrd6/patches/02-missing_netlink_defs.patch b/ipv6/mrd6/patches/02-missing_netlink_defs.patch new file mode 100644 index 000000000..e8a437cab --- /dev/null +++ b/ipv6/mrd6/patches/02-missing_netlink_defs.patch @@ -0,0 +1,55 @@ +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 +--- mrd6-0.9.5/include/mrdpriv/linux/netlink_missing_defs.h 1970-01-01 01:00:00.000000000 +0100 ++++ mrd6-0.9.5.new/include/mrdpriv/linux/netlink_missing_defs.h 2007-01-11 12:26:55.000000000 +0100 +@@ -0,0 +1,40 @@ ++#include ++#include ++#include ++#include ++ ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) ++ ++#ifndef IFA_RTA ++#define IFA_RTA(r) \ ++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) ++#endif ++#ifndef IFA_PAYLOAD ++#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg)) ++#endif ++ ++#ifndef IFLA_RTA ++#define IFLA_RTA(r) \ ++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) ++#endif ++#ifndef IFLA_PAYLOAD ++#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) ++#endif ++ ++#ifndef NDA_RTA ++#define NDA_RTA(r) \ ++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndmsg)))) ++#endif ++#ifndef NDA_PAYLOAD ++#define NDA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndmsg)) ++#endif ++ ++#ifndef NDTA_RTA ++#define NDTA_RTA(r) \ ++ ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ndtmsg)))) ++#endif ++#ifndef NDTA_PAYLOAD ++#define NDTA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ndtmsg)) ++#endif ++ ++#endif +diff -urN mrd6-0.9.5/src/linux/linux_unicast_route.cpp mrd6-0.9.5.new/src/linux/linux_unicast_route.cpp +--- mrd6-0.9.5/src/linux/linux_unicast_route.cpp 2006-01-06 00:08:02.000000000 +0100 ++++ mrd6-0.9.5.new/src/linux/linux_unicast_route.cpp 2007-01-11 12:24:08.000000000 +0100 +@@ -22,6 +22,7 @@ + */ + + #include ++#include + + #include + #include