Mercurial > hg > aboriginal
annotate sources/patches/busybox-fixunaligned32.patch @ 752:9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 20 Jun 2009 01:57:35 -0500 |
parents | |
children |
rev | line source |
---|---|
752
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
1 commit 3be2308676607bdb0e901d439e288081c39011a4 |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
2 Author: Denis Vlasenko <vda.linux@googlemail.com> |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
3 Date: Fri Apr 17 22:20:44 2009 +0000 |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
4 |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
5 fix move_to_unaligned32 |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
6 |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
7 diff --git a/include/platform.h b/include/platform.h |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
8 index 47fd5f6..317349f 100644 |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
9 --- a/include/platform.h |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
10 +++ b/include/platform.h |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
11 @@ -173,7 +173,10 @@ |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
12 /* performs reasonably well (gcc usually inlines memcpy here) */ |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
13 #define move_from_unaligned16(v, u16p) (memcpy(&(v), (u16p), 2)) |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
14 #define move_from_unaligned32(v, u32p) (memcpy(&(v), (u32p), 4)) |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
15 -#define move_to_unaligned32(u32p, v) (memcpy((u32p), &(v), 4)) |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
16 +#define move_to_unaligned32(u32p, v) do { \ |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
17 + uint32_t __t = (v); \ |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
18 + memcpy((u32p), &__t, 4); \ |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
19 +} while (0) |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
20 #endif |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
21 |
9f6b0cad047c
Backport busybox bugfix that breaks non-x86 targets with gcc 4.2.1.
Rob Landley <rob@landley.net>
parents:
diff
changeset
|
22 /* ---- Networking ------------------------------------------ */ |