summaryrefslogtreecommitdiff
path: root/package/busybox/busybox-1.16.1-dnsd.patch
diff options
context:
space:
mode:
Diffstat (limited to 'package/busybox/busybox-1.16.1-dnsd.patch')
-rw-r--r--package/busybox/busybox-1.16.1-dnsd.patch29
1 files changed, 24 insertions, 5 deletions
diff --git a/package/busybox/busybox-1.16.1-dnsd.patch b/package/busybox/busybox-1.16.1-dnsd.patch
index 414ac33e3..bbcd11672 100644
--- a/package/busybox/busybox-1.16.1-dnsd.patch
+++ b/package/busybox/busybox-1.16.1-dnsd.patch
@@ -1,6 +1,6 @@
diff -urpN busybox-1.16.1/include/platform.h busybox-1.16.1-dnsd/include/platform.h
---- busybox-1.16.1/include/platform.h 2010-03-28 10:43:35.000000000 -0700
-+++ busybox-1.16.1-dnsd/include/platform.h 2010-04-14 10:06:10.888341149 -0700
+--- busybox-1.16.1/include/platform.h 2010-03-28 19:43:35.000000000 +0200
++++ busybox-1.16.1-dnsd/include/platform.h 2010-04-14 19:06:10.000000000 +0200
@@ -291,10 +291,12 @@ typedef unsigned smalluint;
#if 1 /* if needed: !defined(arch1) && !defined(arch2) */
# define ALIGN1 __attribute__((aligned(1)))
@@ -15,9 +15,28 @@ diff -urpN busybox-1.16.1/include/platform.h busybox-1.16.1-dnsd/include/platfor
diff -urpN busybox-1.16.1/networking/dnsd.c busybox-1.16.1-dnsd/networking/dnsd.c
---- busybox-1.16.1/networking/dnsd.c 2010-03-28 10:43:36.000000000 -0700
-+++ busybox-1.16.1-dnsd/networking/dnsd.c 2010-04-14 10:06:10.922348571 -0700
-@@ -459,7 +459,8 @@ int dnsd_main(int argc UNUSED_PARAM, cha
+--- busybox-1.16.1/networking/dnsd.c 2010-03-28 19:43:36.000000000 +0200
++++ busybox-1.16.1-dnsd/networking/dnsd.c 2010-04-26 14:20:25.000000000 +0200
+@@ -44,10 +44,15 @@ struct dns_head {
+ uint16_t nauth;
+ uint16_t nadd;
+ };
++/* Structure used to access type and class fields.
++ * They are totally unaligned, but gcc 4.3.4 thinks that pointer of type uint16_t*
++ * is 16-bit aligned and replaces 16-bit memcpy (in move_from_unaligned16 macro)
++ * with aligned halfword access on arm920t!
++ * Oh well. Slapping PACKED everywhere seems to help: */
+ struct dns_prop {
+- uint16_t type;
+- uint16_t class;
+-};
++ uint16_t type PACKED;
++ uint16_t class PACKED;
++} PACKED;
+ /* element of known name, ip address and reversed ip address */
+ struct dns_entry {
+ struct dns_entry *next;
+@@ -459,7 +464,8 @@ int dnsd_main(int argc UNUSED_PARAM, cha
unsigned lsa_size;
int udps, opts;
uint16_t port = 53;