diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2019-05-27 11:57:43 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-05-28 10:36:09 +0200 |
commit | 536e8ef97682083eb84efccbf5a3b0188eb466c5 (patch) | |
tree | f264a1f291e2deafb1ce727f571f5977936fcbb1 /scripts | |
parent | d2211c83365e5473cede0aa4704294d03270e59c (diff) | |
download | barebox-536e8ef97682083eb84efccbf5a3b0188eb466c5.tar.gz barebox-536e8ef97682083eb84efccbf5a3b0188eb466c5.tar.xz |
scripts: compiler.h: use Linux <endian.h> as default
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 <a.fatoum@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/compiler.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/compiler.h b/scripts/compiler.h index ee2097aa36..01b0de44f1 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; |