The kernel headers installed by Linux 2.6.19-rc1 "make headers_install" do not work for building glibc, because glibc expects <linux/rtnetlink.h> to provide various definitions, some of which have been moved to <linux/if_addr.h> and some of which have been removed altogether.
This kernel patch allows glibc to build again by making rtnetlink.h include if_addr.h and adding back the removed definitions required by glibc, but I don't know if it's the correct approach or if glibc should change the headers it includes and add its own macro definitions. Signed-off-by: Joseph Myers <[EMAIL PROTECTED]> --- Index: include/linux/rtnetlink.h =================================================================== --- include/linux/rtnetlink.h +++ include/linux/rtnetlink.h @@ -2,6 +2,7 @@ #define __LINUX_RTNETLINK_H #include <linux/netlink.h> +#include <linux/if_addr.h> #include <linux/if_link.h> /**** Index: include/linux/if_link.h =================================================================== --- include/linux/if_link.h +++ include/linux/if_link.h @@ -82,6 +82,9 @@ #define IFLA_MAX (__IFLA_MAX - 1) +#define IFLA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifinfomsg)))) +#define IFLA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifinfomsg)) + /* ifi_flags. IFF_* flags. Index: include/linux/if_addr.h =================================================================== --- include/linux/if_addr.h +++ include/linux/if_addr.h @@ -52,4 +52,7 @@ __u32 tstamp; /* updated timestamp, hundredths of seconds */ }; +#define IFA_RTA(r) ((struct rtattr*)(((char*)(r)) + NLMSG_ALIGN(sizeof(struct ifaddrmsg)))) +#define IFA_PAYLOAD(n) NLMSG_PAYLOAD(n,sizeof(struct ifaddrmsg)) + #endif -- Joseph S. Myers [EMAIL PROTECTED] - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html