diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-01-20 14:57:07 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-20 14:57:07 -0500 |
commit | 6fbfc9688448aac064edbaccb5d30ecd565a9105 (patch) | |
tree | 8983c5fa124f2f401c01bdffe6d307809ef8d449 /include/linux | |
parent | 3ee68c4af3fd7228c1be63254b9f884614f9ebb2 (diff) |
[NETFILTER]: Unbreak x-tables on x86.
x86 defines __alignof__(long long) as 8 yet it gives 4
for a struct containing a long long, ho hum... so my
simplified form doesn't work everywhere.
So use Harald Welte's original patch, which should work
on all platforms.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/netfilter/x_tables.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h index 59ff6c430cf6..6500d4e59d46 100644 --- a/include/linux/netfilter/x_tables.h +++ b/include/linux/netfilter/x_tables.h | |||
@@ -19,7 +19,21 @@ struct xt_get_revision | |||
19 | /* For standard target */ | 19 | /* For standard target */ |
20 | #define XT_RETURN (-NF_REPEAT - 1) | 20 | #define XT_RETURN (-NF_REPEAT - 1) |
21 | 21 | ||
22 | #define XT_ALIGN(s) (((s) + (__alignof__(u_int64_t)-1)) & ~(__alignof__(u_int64_t)-1)) | 22 | /* this is a dummy structure to find out the alignment requirement for a struct |
23 | * containing all the fundamental data types that are used in ipt_entry, | ||
24 | * ip6t_entry and arpt_entry. This sucks, and it is a hack. It will be my | ||
25 | * personal pleasure to remove it -HW | ||
26 | */ | ||
27 | struct _xt_align | ||
28 | { | ||
29 | u_int8_t u8; | ||
30 | u_int16_t u16; | ||
31 | u_int32_t u32; | ||
32 | u_int64_t u64; | ||
33 | }; | ||
34 | |||
35 | #define XT_ALIGN(s) (((s) + (__alignof__(struct _xt_align)-1)) \ | ||
36 | & ~(__alignof__(struct _xt_align)-1)) | ||
23 | 37 | ||
24 | /* Standard return verdict, or do jump. */ | 38 | /* Standard return verdict, or do jump. */ |
25 | #define XT_STANDARD_TARGET "" | 39 | #define XT_STANDARD_TARGET "" |