summaryrefslogtreecommitdiff
path: root/dist/Mesa/src
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2013-08-14 13:25:57 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2013-08-14 13:25:57 +0000
commitf88ec913439abdacb7e8155b397f9734e31da28c (patch)
treed3d9f39faec5b1c19220c1d8518c5c00275a5334 /dist/Mesa/src
parent478b85a94a5413b0dede92836ebcffc8f1f52280 (diff)
don't depend on a list of archs to determine endianess,
unbreaks gallium build on sparc64. found the hard way by florian@ ok kettenis@
Diffstat (limited to 'dist/Mesa/src')
-rw-r--r--dist/Mesa/src/gallium/include/pipe/p_config.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/dist/Mesa/src/gallium/include/pipe/p_config.h b/dist/Mesa/src/gallium/include/pipe/p_config.h
index 8a5d892c8..818d8944c 100644
--- a/dist/Mesa/src/gallium/include/pipe/p_config.h
+++ b/dist/Mesa/src/gallium/include/pipe/p_config.h
@@ -129,6 +129,16 @@
# define PIPE_ARCH_BIG_ENDIAN
#endif
+#elif defined(__OpenBSD__)
+#include <sys/types.h>
+#include <machine/endian.h>
+
+#if _BYTE_ORDER == _LITTLE_ENDIAN
+# define PIPE_ARCH_LITTLE_ENDIAN
+#elif _BYTE_ORDER == _BIG_ENDIAN
+# define PIPE_ARCH_BIG_ENDIAN
+#endif
+
#else
#if defined(PIPE_ARCH_X86) || defined(PIPE_ARCH_X86_64)