From f062e28dc94c5229f7eb6e15b09080452daf54e9 Mon Sep 17 00:00:00 2001 From: Lars Poeschel Date: Mon, 27 Feb 2012 18:14:28 +0100 Subject: Add unaligned.h to sandbox arch To be able to use the sandbox with fat filesystem support unaligned.h is needed. It tries to be general in selecting little endian or big endian on a gcc macro. Signed-off-by: Lars Poeschel Signed-off-by: Sascha Hauer --- arch/sandbox/include/asm/unaligned.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 arch/sandbox/include/asm/unaligned.h (limited to 'arch/sandbox/include') diff --git a/arch/sandbox/include/asm/unaligned.h b/arch/sandbox/include/asm/unaligned.h new file mode 100644 index 0000000000..07c1ae4dcd --- /dev/null +++ b/arch/sandbox/include/asm/unaligned.h @@ -0,0 +1,19 @@ +#ifndef _ASM_SANDBOX_UNALIGNED_H +#define _ASM_SANDBOX_UNALIGNED_H + +/* + * The architecture sandbox is compiled on can do unaligned accesses itself. + */ + +#include +#include + +#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +#define get_unaligned __get_unaligned_le +#define put_unaligned __put_unaligned_le +#else +#define get_unaligned __get_unaligned_be +#define put_unaligned __put_unaligned_be +#endif + +#endif /* _ASM_SANDBOX_UNALIGNED_H */ -- cgit v1.2.3