summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrediano Ziglio <fziglio@redhat.com>2015-08-18 17:22:08 +0100
committerFrediano Ziglio <fziglio@redhat.com>2015-08-19 15:42:10 +0100
commit2cd036e9d42ce9bf053609c9030ee7e2f9c01790 (patch)
treeea42d902f46c5b4373f6f6cd4f5554cbec929b6b
parent726c6520aea11e8dc281b903f7253986983731d3 (diff)
Fix endianess compatibility with old GCC versions
GCC 4.4.7 does not define __BYTE_ORDER__ macros so use architecture macro to attempt to detect endianess. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Reported-by: Swapna Krishnan <skrishna@redhat.com> Tested-by: Swapna Krishnan <skrishna@redhat.com> Acked-by: Uri Lublin <uril@redhat.com>
-rw-r--r--spice/macros.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/spice/macros.h b/spice/macros.h
index 716f6e0..180c2b7 100644
--- a/spice/macros.h
+++ b/spice/macros.h
@@ -383,7 +383,8 @@
#ifndef SPICE_ENDIAN
# if defined(__LITTLE_ENDIAN__) || defined(__ARMEL__) \
|| defined(__THUMBEL__) || defined(__AARCH64EL__) \
- || defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__)
+ || defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) \
+ || defined(__amd64__) || defined(__x86_64__) || defined(__i386__)
# define SPICE_ENDIAN SPICE_ENDIAN_LITTLE
# endif
# if defined(__BIG_ENDIAN__) || defined(__ARMEB__) \