mirror of
https://github.com/sheumann/hush.git
synced 2025-01-11 23:29:51 +00:00
fix compile error on non-x86 architectures
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
9ad97d5041
commit
b40da22357
@ -218,14 +218,15 @@
|
|||||||
|
|
||||||
/* ---- Unaligned access ------------------------------------ */
|
/* ---- Unaligned access ------------------------------------ */
|
||||||
|
|
||||||
|
typedef int bb__aliased_int FIX_ALIASING;
|
||||||
|
typedef uint16_t bb__aliased_uint16_t FIX_ALIASING;
|
||||||
|
typedef uint32_t bb__aliased_uint32_t FIX_ALIASING;
|
||||||
|
|
||||||
/* NB: unaligned parameter should be a pointer, aligned one -
|
/* NB: unaligned parameter should be a pointer, aligned one -
|
||||||
* a lvalue. This makes it more likely to not swap them by mistake
|
* a lvalue. This makes it more likely to not swap them by mistake
|
||||||
*/
|
*/
|
||||||
#if defined(i386) || defined(__x86_64__) || defined(__powerpc__)
|
#if defined(i386) || defined(__x86_64__) || defined(__powerpc__)
|
||||||
# include <stdint.h>
|
# include <stdint.h>
|
||||||
typedef int bb__aliased_int FIX_ALIASING;
|
|
||||||
typedef uint16_t bb__aliased_uint16_t FIX_ALIASING;
|
|
||||||
typedef uint32_t bb__aliased_uint32_t FIX_ALIASING;
|
|
||||||
# define move_from_unaligned_int(v, intp) ((v) = *(bb__aliased_int*)(intp))
|
# define move_from_unaligned_int(v, intp) ((v) = *(bb__aliased_int*)(intp))
|
||||||
# define move_from_unaligned16(v, u16p) ((v) = *(bb__aliased_uint16_t*)(u16p))
|
# define move_from_unaligned16(v, u16p) ((v) = *(bb__aliased_uint16_t*)(u16p))
|
||||||
# define move_from_unaligned32(v, u32p) ((v) = *(bb__aliased_uint32_t*)(u32p))
|
# define move_from_unaligned32(v, u32p) ((v) = *(bb__aliased_uint32_t*)(u32p))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user