From 985d254c909903787e4bbc517af30406e0e9df8b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sun, 10 Dec 2006 10:51:12 +0000 Subject: * sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h if IFA_MAX is not defined. (IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not defined. * sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h. --- ChangeLog | 9 +++++++++ fedora/glibc.spec.in | 1 + sysdeps/unix/sysv/linux/check_pf.c | 5 +---- sysdeps/unix/sysv/linux/netlinkaccess.h | 18 ++++++++++++++++++ 4 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0e8507a668..6e5f01a12a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2006-12-10 Jakub Jelinek + + * sysdeps/unix/sysv/linux/netlinkaccess.h: Include linux/if_addr.h + if IFA_MAX is not defined. + (IFA_RTA, IFA_PAYLOAD, IFLA_RTA, IFLA_PAYLOAD): Define if not + defined. + * sysdeps/unix/sysv/linux/check_pf.c: Include netlinkaccess.h + instead of asm/types.h, linux/netlink.h and linux/rtnetlink.h. + 2006-12-09 Ulrich Drepper [BZ #3632] diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in index 7d39fbcdf3..96fd4ace67 100644 --- a/fedora/glibc.spec.in +++ b/fedora/glibc.spec.in @@ -1555,6 +1555,7 @@ rm -f *.filelist* nis_list and nis_lookup (#209155) - fix ttyname and ttyname_r with invalid file descriptor (#218276) - cs_CZ LC_TIME fixes (#218438) +- fix build with 2.6.19+ headers (#217723) * Fri Dec 1 2006 Jakub Jelinek 2.5.90-10 - fix x86-64 restore_rt unwind info diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c index 13ccd7acb4..ebe4d699b1 100644 --- a/sysdeps/unix/sysv/linux/check_pf.c +++ b/sysdeps/unix/sysv/linux/check_pf.c @@ -27,13 +27,10 @@ #include #include -#include -#include -#include - #include #include +#include "netlinkaccess.h" #ifndef IFA_F_TEMPORARY # define IFA_F_TEMPORARY IFA_F_SECONDARY diff --git a/sysdeps/unix/sysv/linux/netlinkaccess.h b/sysdeps/unix/sysv/linux/netlinkaccess.h index 92310b77df..48903d3725 100644 --- a/sysdeps/unix/sysv/linux/netlinkaccess.h +++ b/sysdeps/unix/sysv/linux/netlinkaccess.h @@ -25,6 +25,24 @@ #include +#ifndef IFA_MAX +/* 2.6.19 kernel headers helpfully removed some macros and + moved lots of stuff into new headers, some of which aren't + included by linux/rtnetlink.h. */ +#include +#endif + +#ifndef IFA_RTA +# define IFA_RTA(r) \ + ((struct rtattr*) ((char*)(r) + NLMSG_ALIGN (sizeof (struct ifaddrmsg)))) +# 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)))) +# define IFLA_PAYLOAD(n) NLMSG_PAYLOAD (n, sizeof (struct ifinfomsg)) +#endif struct netlink_res { -- cgit v1.2.3