diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-01-21 01:16:09 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-01-21 01:16:09 +0100 |
commit | b40da22357563bf53fa93823342f8ab59899222d (patch) | |
tree | 996928919035f2c1429dd45829dc06c93c0c9ba5 | |
parent | 9ad97d504146db2ea6b6a1a23c96ca052c50e270 (diff) | |
download | busybox-w32-b40da22357563bf53fa93823342f8ab59899222d.tar.gz busybox-w32-b40da22357563bf53fa93823342f8ab59899222d.tar.bz2 busybox-w32-b40da22357563bf53fa93823342f8ab59899222d.zip |
fix compile error on non-x86 architectures
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | include/platform.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/platform.h b/include/platform.h index 6328ff6ad..cbde7bc7b 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -218,14 +218,15 @@ | |||
218 | 218 | ||
219 | /* ---- Unaligned access ------------------------------------ */ | 219 | /* ---- Unaligned access ------------------------------------ */ |
220 | 220 | ||
221 | typedef int bb__aliased_int FIX_ALIASING; | ||
222 | typedef uint16_t bb__aliased_uint16_t FIX_ALIASING; | ||
223 | typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; | ||
224 | |||
221 | /* NB: unaligned parameter should be a pointer, aligned one - | 225 | /* NB: unaligned parameter should be a pointer, aligned one - |
222 | * a lvalue. This makes it more likely to not swap them by mistake | 226 | * a lvalue. This makes it more likely to not swap them by mistake |
223 | */ | 227 | */ |
224 | #if defined(i386) || defined(__x86_64__) || defined(__powerpc__) | 228 | #if defined(i386) || defined(__x86_64__) || defined(__powerpc__) |
225 | # include <stdint.h> | 229 | # include <stdint.h> |
226 | typedef int bb__aliased_int FIX_ALIASING; | ||
227 | typedef uint16_t bb__aliased_uint16_t FIX_ALIASING; | ||
228 | typedef uint32_t bb__aliased_uint32_t FIX_ALIASING; | ||
229 | # define move_from_unaligned_int(v, intp) ((v) = *(bb__aliased_int*)(intp)) | 230 | # define move_from_unaligned_int(v, intp) ((v) = *(bb__aliased_int*)(intp)) |
230 | # define move_from_unaligned16(v, u16p) ((v) = *(bb__aliased_uint16_t*)(u16p)) | 231 | # define move_from_unaligned16(v, u16p) ((v) = *(bb__aliased_uint16_t*)(u16p)) |
231 | # define move_from_unaligned32(v, u32p) ((v) = *(bb__aliased_uint32_t*)(u32p)) | 232 | # define move_from_unaligned32(v, u32p) ((v) = *(bb__aliased_uint32_t*)(u32p)) |