dnsd: enforce alignment on packet buffer

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2010-04-14 10:14:25 -07:00
parent 8597da1934
commit 0ecc116592
2 changed files with 4 additions and 1 deletions

View File

@@ -281,10 +281,12 @@ typedef unsigned smalluint;
#if 1 /* if needed: !defined(arch1) && !defined(arch2) */
# define ALIGN1 __attribute__((aligned(1)))
# define ALIGN2 __attribute__((aligned(2)))
# define ALIGN4 __attribute__((aligned(4)))
#else
/* Arches which MUST have 2 or 4 byte alignment for everything are here */
# define ALIGN1
# define ALIGN2
# define ALIGN4
#endif