linux-3.2.*, iptables, linux/if_packet.h, and '__aligned_u64' compile problem

Khem Raj raj.khem at gmail.com
Sat Jan 28 05:59:41 UTC 2012


On Fri, Jan 27, 2012 at 4:56 PM, Kevin Day <thekevinday at gmail.com> wrote:
> In the 3.2 linux kernel series, the structure tpacket_hdr_v1 was added
> to linux/if_packet.h.
> Inside of that structure, the following variable was defined:
>
> __aligned_u64   seq_num;
>
> While compiling iptables 1.4.12.2 on a x86_64 system with the headers
> from the said kernel installed, I get the following compile error:
>
> /usr/include/linux/if_packet.h:176: error: expected
> specifier-qualifier-list before '__aligned_u64'.
>
> According to the article here:
>  http://web.archiveorange.com/archive/v/EazJNEDWPcR6tgKsiHvQ
> To solve this problem, I have to add the following to sys/types.h:
>
> #define __aligned_u64 __u64 __attribute__((aligned(8)))
> #define __aligned_be64 __be64 __attribute__((aligned(8)))
> #define __aligned_le64 __le64 __attribute__((aligned(8)))
>
> This fix seems to do the trick for me.
> Is this a valid fix and can it or a proper solution be commited upstream?

why dont include <linux/types.h> in your app


>
>
> --
> Kevin Day
> _______________________________________________
> uClibc mailing list
> uClibc at uclibc.org
> http://lists.busybox.net/mailman/listinfo/uclibc


More information about the uClibc mailing list