[PATCH] Fix compatibility with old GCC versions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
Reported-by: Swapna Krishnan <skrishna@xxxxxxxxxx>
Tested-by: Swapna Krishnan <skrishna@xxxxxxxxxx>
---
 spice/macros.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]