diff options
-rw-r--r-- | networking/dnsd.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c index c76a54f9e..1a99040ac 100644 --- a/networking/dnsd.c +++ b/networking/dnsd.c | |||
@@ -44,10 +44,15 @@ struct dns_head { | |||
44 | uint16_t nauth; | 44 | uint16_t nauth; |
45 | uint16_t nadd; | 45 | uint16_t nadd; |
46 | }; | 46 | }; |
47 | /* Structure used to access type and class fields. | ||
48 | * They are totally unaligned, but gcc 4.3.4 thinks that pointer of type uint16_t* | ||
49 | * is 16-bit aligned and replaces 16-bit memcpy (in move_from_unaligned16 macro) | ||
50 | * with aligned halfword access on arm920t! | ||
51 | * Oh well. Slapping PACKED everywhere seems to help: */ | ||
47 | struct type_and_class { | 52 | struct type_and_class { |
48 | uint16_t type; | 53 | uint16_t type PACKED; |
49 | uint16_t class; | 54 | uint16_t class PACKED; |
50 | }; | 55 | } PACKED; |
51 | /* element of known name, ip address and reversed ip address */ | 56 | /* element of known name, ip address and reversed ip address */ |
52 | struct dns_entry { | 57 | struct dns_entry { |
53 | struct dns_entry *next; | 58 | struct dns_entry *next; |