From: Ali Saidi Date: Tue, 23 Jan 2007 02:57:01 +0000 (-0500) Subject: fix compiling on x86/Solaris X-Git-Tag: m5_2.0_beta3~224^2~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=60eaa03d72a13863596e64343d7407af1cab51c5;p=gem5.git fix compiling on x86/Solaris --HG-- extra : convert_revision : f7d21fc277dd7172c244d83fb012883dc8b67895 --- diff --git a/src/sim/byteswap.hh b/src/sim/byteswap.hh index 7b1ae701e..4ac1ee711 100644 --- a/src/sim/byteswap.hh +++ b/src/sim/byteswap.hh @@ -130,7 +130,7 @@ template static inline T letobe(T value) {return swap_byte(value);} //For conversions not involving the guest system, we can define the functions //conditionally based on the BYTE_ORDER macro and outside of the namespaces -#if defined(_BIG_ENDIAN) || BYTE_ORDER == BIG_ENDIAN +#if defined(_BIG_ENDIAN) || !defined(_LITTLE_ENDIAN) && BYTE_ORDER == BIG_ENDIAN template static inline T htole(T value) {return swap_byte(value);} template static inline T letoh(T value) {return swap_byte(value);} template static inline T htobe(T value) {return value;}