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>
This commit is contained in:
Frediano Ziglio 2015-08-18 17:22:08 +01:00
parent 726c6520ae
commit 2cd036e9d4

View File

@ -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__) \