[PATCH 1/3] sandbox-unaligned: better usement of ifdef

Alexander Aring alex.aring at googlemail.com
Tue Sep 11 01:30:43 EDT 2012


GCC versions below 4.6 don't set __BYTE_ORDER__
with __ORDER_LITTLE_ENDIAN__. So it's better to use
__BYTE_ORDER and __LITTLE_ENDIAN instead.

Signed-off-by: Alexander Aring <alex.aring at gmail.com>
---
 arch/sandbox/include/asm/unaligned.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sandbox/include/asm/unaligned.h b/arch/sandbox/include/asm/unaligned.h
index 07c1ae4..d02da6e 100644
--- a/arch/sandbox/include/asm/unaligned.h
+++ b/arch/sandbox/include/asm/unaligned.h
@@ -8,7 +8,7 @@
 #include <linux/unaligned/access_ok.h>
 #include <linux/unaligned/generic.h>
 
-#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#if __BYTE_ORDER == __LITTLE_ENDIAN
 #define get_unaligned __get_unaligned_le
 #define put_unaligned __put_unaligned_le
 #else
-- 
1.7.12




More information about the barebox mailing list