[PATCH] dix: Fix endianess detection

Olivier Fourdan ofourdan at redhat.com
Thu Apr 9 06:33:22 PDT 2015


Make sure X_BIG_ENDIAN/X_LITTLE_ENDIAN are defined before actually using
them.

Otherwise, byte order could be wrong even though endianess detection is
correct.

Reported-by: Tim Waugh <twaugh at redhat.com>
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
 include/dix-config.h.in | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/include/dix-config.h.in b/include/dix-config.h.in
index 1aa77a5..192c558 100644
--- a/include/dix-config.h.in
+++ b/include/dix-config.h.in
@@ -3,6 +3,14 @@
 #ifndef _DIX_CONFIG_H_
 #define _DIX_CONFIG_H_
 
+#ifndef X_BIG_ENDIAN
+#  define X_BIG_ENDIAN 4321
+#endif
+
+#ifndef X_LITTLE_ENDIAN
+#  define X_LITTLE_ENDIAN 1234
+#endif
+
 /* Support BigRequests extension */
 #undef BIGREQS
 
-- 
2.3.5



More information about the xorg-devel mailing list