summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorPeter Korsgaard <jacmet@sunsite.dk>2009-04-17 18:17:33 +0000
committerPeter Korsgaard <jacmet@sunsite.dk>2009-04-17 18:17:33 +0000
commit40367aa404bbe375c0d192c00bd375d4638f929e (patch)
tree77d3031ed525ae59480033a957f614e06b730e37 /package
parent23795ec71f546c4d89b911f67d539393d92059ce (diff)
downloadbuildroot-novena-40367aa404bbe375c0d192c00bd375d4638f929e.tar.gz
buildroot-novena-40367aa404bbe375c0d192c00bd375d4638f929e.zip
busybox: 1.14.0 fix for move_to_unaligned32 / dnsd.c on !x86
Diffstat (limited to 'package')
-rw-r--r--package/busybox/busybox-1.14.0-unaligned-fix.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/package/busybox/busybox-1.14.0-unaligned-fix.patch b/package/busybox/busybox-1.14.0-unaligned-fix.patch
new file mode 100644
index 000000000..33ebd4a4a
--- /dev/null
+++ b/package/busybox/busybox-1.14.0-unaligned-fix.patch
@@ -0,0 +1,28 @@
+[PATCH] fix move_to_unaligned32() for !x86
+
+get_unaligned() got changed into move_{from,to}_unaligned() in r24334, but
+the temporary variabled used to make sure we can take the address of the
+source argument for memcpy() got removed. Later on in r26068 dnsd.c got
+changed to call move_to_unaligned with htons/htonl as source breaking
+the build for !x86.
+
+Fix it by reintroducing the temporary variable.
+
+Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
+---
+ include/platform.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: busybox-1.14.0/include/platform.h
+===================================================================
+--- busybox-1.14.0.orig/include/platform.h
++++ busybox-1.14.0/include/platform.h
+@@ -173,7 +173,7 @@
+ /* performs reasonably well (gcc usually inlines memcpy here) */
+ #define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2))
+ #define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4))
+-#define move_to_unaligned32(u32p, v) (memcpy((u32p), &(v), 4))
++#define move_to_unaligned32(u32p, v) do { uint32_t __t = (v); memcpy((u32p), &__t, 4); } while (0)
+ #endif
+
+ /* ---- Networking ------------------------------------------ */