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>
This commit is contained in:
Olivier Fourdan 2015-04-10 10:07:38 +02:00 committed by Adam Jackson
parent 28159eff6b
commit 1af15aaf27
1 changed files with 2 additions and 0 deletions

View File

@ -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