linux-libc-headers-2.6.10.0: if_tunnel.h relies on byteorder.h having been included
Subsystems (3)
PATCH 1/1 linux-libc-headers-2.6.10.0: if_tunnel.h relies on byteorder.h having been included
In iproute2, ip/iptunnel.c says:
#include <linux/if.h>
#include <linux/if_arp.h>
#include <linux/ip.h>
#include <linux/if_tunnel.h>
Now the original Linux kernel includes byteorder.h as a side-effect of including netdevice.h, which it does inside a __KERNEL__ ifdef when if_arp.h is included.
I think it makes more sense to include it in those headers that actually use the __constant_htons() macro, viz:
include/linux/if_pppox.h +1 -0
@@ -21,6 +21,7 @@#include <asm/types.h> #include <endian.h> #include <byteswap.h> +#include <asm/byteorder.h> /* For user-space programs to pick up these definitions * which they wouldn't get otherwise without defining __KERNEL__
include/linux/if_tunnel.h +1 -0
@@ -4,6 +4,7 @@#include <linux/if.h> #include <linux/ip.h> #include <asm/types.h> +#include <asm/byteorder.h> #define SIOCGETTUNNEL (SIOCDEVPRIVATE + 0)#define SIOCADDTUNNEL (SIOCDEVPRIVATE + 1)
include/linux/sctp.h +1 -0
@@ -53,6 +53,7 @@#include <linux/in.h> /* We need in_addr. */ #include <linux/in6.h> /* We need in6_addr. */ +#include <asm/byteorder.h> /* Section 3.1. SCTP Common Header Format */
(With this patch, the header stands alone, and iproute2 compiles again.)
Signature · 1 line
Synapsids unite! You have nothing to lose but your eggshells!
Mariusz Mazur
AppliedOn niedziela 13 luty 2005 17:38, Nix wrote:
---snip---
Applied, thanks. Though I believe CCing such mails to lkml is kind of pointless.
Signature · 5 lines
In the year eighty five ten God is gonna shake his mighty head He'll either say, "I'm pleased where man has been" Or tear it down, and start again