diff options
author | Jonathan Gray <[email protected]> | 2014-03-10 08:54:43 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-03-11 08:47:12 -0600 |
commit | 40214267aba2f357eb3334eb8235504ccb93035a (patch) | |
tree | 35911da3f43114e4a280fb2efdd823c9c625a051 /src | |
parent | a6efbac9fb502c4f0166e7a0680b6828e1f6926c (diff) |
gallium: add endian detection for OpenBSD
Cc: "10.0" "10.1" <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/include/pipe/p_config.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/include/pipe/p_config.h b/src/gallium/include/pipe/p_config.h index d6036818fd8..b5e773694a5 100644 --- a/src/gallium/include/pipe/p_config.h +++ b/src/gallium/include/pipe/p_config.h @@ -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) |