X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fif_link.h;h=55d99e46ea81340d25cd855a7a84201ef4f8fa1a;hb=9197df76b46ff6fbe1f7a522961730ffc55a860d;hp=41f1a9cc91f60e6f29f1d299cc22863227b8608e;hpb=ec61a01cd8ed73b13ffe042ddff4baf41f6b63e7;p=sliver-openvswitch.git diff --git a/include/linux/if_link.h b/include/linux/if_link.h index 41f1a9cc9..55d99e46e 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h @@ -1,10 +1,24 @@ #ifndef __LINUX_IF_LINK_WRAPPER_H #define __LINUX_IF_LINK_WRAPPER_H 1 +#include + +#ifdef HAVE_RTNL_LINK_STATS64 #include_next +#else /* !HAVE_RTNL_LINK_STATS64 */ + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19) +#include_next +#else +/* Before 2.6.19 there was no . Instead all of the types now + * declared there were in . Unfortunately from 2.6.18 + * conflicts badly enough with to break the userspace build. All + * we really need from is struct rtnl_link_stats64, which in + * turn only really needs __u64. */ +#include +#include +#endif /* kernel < 2.6.19 */ -#include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35) /* The main device statistics structure */ struct rtnl_link_stats64 { __u64 rx_packets; /* total packets received */ @@ -37,6 +51,6 @@ struct rtnl_link_stats64 { __u64 rx_compressed; __u64 tx_compressed; }; -#endif /* linux kernel < 2.6.35 */ +#endif /* !HAVE_RTNL_LINK_STATS64 */ #endif