summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/mach64
diff options
context:
space:
mode:
authorDave Airlie <airliedfreedesktop.org>2004-06-07 00:29:40 +0000
committerDave Airlie <airliedfreedesktop.org>2004-06-07 00:29:40 +0000
commitedea87529ef3505a3f5f6b12d9c6c7f46fa88b89 (patch)
tree1201f28a6c7ec6c10283ba123ac2d324a0a8d486 /src/mesa/drivers/dri/mach64
parent4ffbb81bd3a7af8a1297e93d1fd4dda61f012a53 (diff)
make endian code work on BSD
Diffstat (limited to 'src/mesa/drivers/dri/mach64')
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_context.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h
index e61083f821b..3d76de754ad 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.h
+++ b/src/mesa/drivers/dri/mach64/mach64_context.h
@@ -355,7 +355,14 @@ extern GLboolean mach64UnbindContext( __DRIcontextPrivate *driContextPriv );
/* ================================================================
* Byte ordering
*/
+#ifdef __linux__
#include <endian.h>
+#else
+#include <sys/endian.h>
+#define __BYTE_ORDER BYTE_ORDER
+#define __LITTLE_ENDIAN LITTLE_ENDIAN
+#define __BIG_ENDIAN BIG_ENDIAN
+#endif
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define LE32_IN( x ) ( *(GLuint *)(x) )