summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2007-01-22 21:57:01 -0500
committerAli Saidi <saidi@eecs.umich.edu>2007-01-22 21:57:01 -0500
commit60eaa03d72a13863596e64343d7407af1cab51c5 (patch)
tree39fca31d25fb910f5d4fff1050229c6fbee30ab8 /src/sim
parent5f662d451ee8311c0f42eaf6ed6415b4d0f0f473 (diff)
downloadgem5-60eaa03d72a13863596e64343d7407af1cab51c5.tar.xz
fix compiling on x86/Solaris
--HG-- extra : convert_revision : f7d21fc277dd7172c244d83fb012883dc8b67895
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/byteswap.hh2
1 files changed, 1 insertions, 1 deletions
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 <typename T> 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 <typename T> static inline T htole(T value) {return swap_byte(value);}
template <typename T> static inline T letoh(T value) {return swap_byte(value);}
template <typename T> static inline T htobe(T value) {return value;}