summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2015-04-10 10:07:38 +0200
committerAdam Jackson <ajax@redhat.com>2015-05-07 14:03:50 -0400
commit1af15aaf278edcf6f6de94774350e34a80883c24 (patch)
treecae29c66ab8e6d421232867e7730a903627a4c15
parent28159eff6badf6181b255f26d1f444abe81c05b7 (diff)
dix: Fix image byte order on big endian hardware
Make sure X_BIG_ENDIAN/X_LITTLE_ENDIAN are defined before actually using them. Otherwise, image byte order could be wrong on big endian hardware even though endianess detection is correct. Reported-by: Tim Waugh <twaugh@redhat.com> Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--include/servermd.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/servermd.h b/include/servermd.h
index a3b5c3af3..087826f48 100644
--- a/include/servermd.h
+++ b/include/servermd.h
@@ -52,6 +52,8 @@ SOFTWARE.
#error xserver code must include dix-config.h before any other headers
#endif
+#include <X11/Xarch.h> /* for X_LITTLE_ENDIAN/X_BIG_ENDIAN */
+
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
#define IMAGE_BYTE_ORDER LSBFirst
#define BITMAP_BIT_ORDER LSBFirst