From 1af15aaf278edcf6f6de94774350e34a80883c24 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Fri, 10 Apr 2015 10:07:38 +0200 Subject: [PATCH] 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 Signed-off-by: Olivier Fourdan Reviewed-by: Adam Jackson --- include/servermd.h | 2 ++ 1 file changed, 2 insertions(+) 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 /* for X_LITTLE_ENDIAN/X_BIG_ENDIAN */ + #if X_BYTE_ORDER == X_LITTLE_ENDIAN #define IMAGE_BYTE_ORDER LSBFirst #define BITMAP_BIT_ORDER LSBFirst