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;}