diff options
Diffstat (limited to 'include/platform.h')
-rw-r--r-- | include/platform.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h index 749169b0c..cc22f4fc9 100644 --- a/include/platform.h +++ b/include/platform.h | |||
@@ -277,6 +277,11 @@ typedef uint64_t bb__aliased_uint64_t FIX_ALIASING; | |||
277 | #define put_unaligned_le32(val, buf) move_to_unaligned32(buf, SWAP_LE32(val)) | 277 | #define put_unaligned_le32(val, buf) move_to_unaligned32(buf, SWAP_LE32(val)) |
278 | #define put_unaligned_be32(val, buf) move_to_unaligned32(buf, SWAP_BE32(val)) | 278 | #define put_unaligned_be32(val, buf) move_to_unaligned32(buf, SWAP_BE32(val)) |
279 | 279 | ||
280 | /* unxz needs an aligned fixed-endian accessor. | ||
281 | * (however, the compiler does not realize it's aligned, the cast is still necessary) | ||
282 | */ | ||
283 | #define get_le32(u32p) ({ uint32_t v = *(bb__aliased_uint32_t*)(u32p); SWAP_LE32(v); }) | ||
284 | |||
280 | 285 | ||
281 | /* ---- Size-saving "small" ints (arch-dependent) ----------- */ | 286 | /* ---- Size-saving "small" ints (arch-dependent) ----------- */ |
282 | 287 | ||