Other systems mimic the GNU endianness headers, e.g. Cygwin. Instead of
explicitly listing them, just make the Linux case the default case by
moving it into the #else clause.

Signed-off-by: Ahmad Fatoum <[email protected]>
---
 scripts/compiler.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/compiler.h b/scripts/compiler.h
index ee2097aa3691..01b0de44f18a 100644
--- a/scripts/compiler.h
+++ b/scripts/compiler.h
@@ -38,10 +38,7 @@
 #define O_BINARY       0
 #endif
 
-#ifdef __linux__
-# include <endian.h>
-# include <byteswap.h>
-#elif defined(__MACH__)
+#if defined(__MACH__)
 # ifdef __APPLE__
 #  include <libkern/OSByteOrder.h>
 #  define htobe16(x) OSSwapHostToBigInt16(x)
@@ -64,6 +61,9 @@
 # define __BIG_ENDIAN    BIG_ENDIAN
 typedef unsigned long ulong;
 typedef unsigned int  uint;
+#else /* assume Linux */
+# include <endian.h>
+# include <byteswap.h>
 #endif
 
 typedef uint8_t __u8;
-- 
2.20.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

Reply via email to