summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatthieu Herrb <[email protected]>2008-09-21 10:56:57 +0200
committerBrian <[email protected]>2009-01-11 16:44:52 -0700
commit33f6dc3c334cc065d7c98d0481be19b208e1837d (patch)
treeccdcbd6243b2e369cb461612c14b2fb1679d8eaa /src/mesa
parent356428d4e4dba433b405f63ff918d76eaf4b4215 (diff)
build fix on big endian OpenBSD architectures.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/mach64/mach64_context.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/mach64/mach64_context.h b/src/mesa/drivers/dri/mach64/mach64_context.h
index 55e0618ff80..854751626d0 100644
--- a/src/mesa/drivers/dri/mach64/mach64_context.h
+++ b/src/mesa/drivers/dri/mach64/mach64_context.h
@@ -294,7 +294,13 @@ extern GLboolean mach64UnbindContext( __DRIcontextPrivate *driContextPriv );
#define LE32_OUT( x, y ) do { *(GLuint *)(x) = (y); } while (0)
#define LE32_OUT_FLOAT( x, y ) do { *(GLfloat *)(x) = (y); } while (0)
#else
+#ifndef __OpenBSD__
#include <byteswap.h>
+#else
+#include <machine/endian.h>
+#define bswap_32 bswap32
+#endif
+
#define LE32_IN( x ) bswap_32( *(GLuint *)(x) )
#define LE32_IN_FLOAT( x ) \
({ \