diff -r 8f5993cfa916 src/sim/byteswap.hh --- a/src/sim/byteswap.hh Mon Mar 23 16:14:20 2015 -0700 +++ b/src/sim/byteswap.hh Fri Mar 27 13:54:00 2015 +0000 @@ -149,7 +149,7 @@ //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) || !defined(_LITTLE_ENDIAN) && BYTE_ORDER == BIG_ENDIAN +#if (defined(_BIG_ENDIAN) || !defined(_LITTLE_ENDIAN)) && BYTE_ORDER == BIG_ENDIAN const ByteOrder HostByteOrder = BigEndianByteOrder; template inline T htole(T value) {return swap_byte(value);} template inline T letoh(T value) {return swap_byte(value);}