OSDN Git Service

build fix on big endian OpenBSD architectures.
authorMatthieu Herrb <matthieu.herrb@laas.fr>
Sun, 21 Sep 2008 08:56:57 +0000 (10:56 +0200)
committerBrian <brianp@vmware.com>
Sun, 11 Jan 2009 23:44:52 +0000 (16:44 -0700)
src/mesa/drivers/dri/mach64/mach64_context.h

index 55e0618..8547516 100644 (file)
@@ -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 )                                             \
 ({                                                                     \