diff options
Diffstat (limited to 'sim/byteswap.hh')
-rw-r--r-- | sim/byteswap.hh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sim/byteswap.hh b/sim/byteswap.hh index c5d8801ab..0dd0ba827 100644 --- a/sim/byteswap.hh +++ b/sim/byteswap.hh @@ -79,7 +79,9 @@ static inline uint64_t swap_byte(uint64_t x) {return swap_byte64(x);} static inline int64_t swap_byte(int64_t x) {return swap_byte64((uint64_t)x);} static inline uint32_t swap_byte(uint32_t x) {return swap_byte32(x);} static inline int32_t swap_byte(int32_t x) {return swap_byte32((uint32_t)x);} -#if defined(__APPLE__) +//This is to prevent the following two functions from compiling on +//64bit machines. It won't detect everything, so it should be changed. +#ifndef __x86_64__ static inline long swap_byte(long x) {return swap_byte32((long)x);} static inline unsigned long swap_byte(unsigned long x) { return swap_byte32((unsigned long)x);} |