gallium: add endian detection for OpenBSD

Cc: "10.0" "10.1" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Jonathan Gray 2014-03-10 08:54:43 -06:00 committed by Brian Paul
parent a6efbac9fb
commit 40214267ab
1 changed files with 10 additions and 0 deletions

View File

@ -157,6 +157,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) || defined(PIPE_ARCH_ARM) || defined(PIPE_ARCH_AARCH64)