[PATCH v2] dix: Fix image byte order on big endian hardware
Olivier Fourdan
ofourdan at redhat.com
Fri Apr 10 01:07:38 PDT 2015
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 at redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
v2: Simply include X11/Xarch.h in servermd.h to make sure
X_LITTLE_ENDIAN/X_BIG_ENDIAN are defined when we need them.
include/servermd.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/servermd.h b/include/servermd.h
index a3b5c3a..087826f 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
--
2.3.5
More information about the xorg-devel
mailing list