Mesa (mesa_7_2_branch): build fix on big endian OpenBSD architectures.
Brian Paul
brianp at kemper.freedesktop.org
Sun Jan 11 23:57:04 UTC 2009
Module: Mesa
Branch: mesa_7_2_branch
Commit: 224a7178a15355470f83f59405dcc5db8b88af5c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=224a7178a15355470f83f59405dcc5db8b88af5c
Author: Matthieu Herrb <matthieu.herrb at laas.fr>
Date: Sun Sep 21 10:56:57 2008 +0200
build fix on big endian OpenBSD architectures.
---
src/mesa/drivers/dri/mach64/mach64_context.h | 6 ++++++
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 c602333..5732401 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 ) \
({ \
More information about the mesa-commit
mailing list