diff options
author | obache <obache> | 2013-05-18 05:55:41 +0000 |
---|---|---|
committer | obache <obache> | 2013-05-18 05:55:41 +0000 |
commit | 6ac2dd74880050ae4be532ef0ff769ac455936d4 (patch) | |
tree | 76a18a2b3b3cb12940ebd71b314b976434dbb592 /graphics | |
parent | 59ca29492bb733e2834d7f2497cb39cd202099f2 (diff) | |
download | pkgsrc-6ac2dd74880050ae4be532ef0ff769ac455936d4.tar.gz |
make sure MESA_{BIG,LITTLE}_ENDIAN are defined correctly on *BSD.
related to PR pkg/47821
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/MesaLib/patches/patch-src_mesa_main_compiler.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/graphics/MesaLib/patches/patch-src_mesa_main_compiler.h b/graphics/MesaLib/patches/patch-src_mesa_main_compiler.h index 52c14c5a08b..463c67d0ec5 100644 --- a/graphics/MesaLib/patches/patch-src_mesa_main_compiler.h +++ b/graphics/MesaLib/patches/patch-src_mesa_main_compiler.h @@ -1,21 +1,27 @@ -$NetBSD: patch-src_mesa_main_compiler.h,v 1.1 2013/05/16 05:22:02 richard Exp $ +$NetBSD: patch-src_mesa_main_compiler.h,v 1.2 2013/05/18 05:55:41 obache Exp $ --- src/mesa/main/compiler.h.orig 2011-11-23 01:09:52.000000000 +0000 +++ src/mesa/main/compiler.h -@@ -248,7 +248,11 @@ extern "C" { +@@ -248,7 +248,17 @@ extern "C" { * Try to use a runtime test instead. * For now, only used by some DRI hardware drivers for color/texel packing. */ -#if defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN +#ifdef __sun +#include <sys/isa_defs.h> ++#elif defined(__OpenBSD__) || defined(__NetBSD__) ++#include <machine/endian.h> ++#elif defined(__FreeBSD__) || defined(__DragonFly__) ++#include <sys/endian.h> +#endif + -+#if (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) || defined(_BIG_ENDIAN) ++#if (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) ||\ ++ (defined(_BYTE_ORDER) && defined(_BIG_ENDIAN) && _BYTE_ORDER == _BIG_ENDIAN) ||\ ++ (defined(__sun) && defined(_BIG_ENDIAN)) #if defined(__linux__) #include <byteswap.h> #define CPU_TO_LE32( x ) bswap_32( x ) -@@ -263,6 +267,9 @@ static INLINE GLuint CPU_TO_LE32(GLuint +@@ -263,6 +273,9 @@ static INLINE GLuint CPU_TO_LE32(GLuint ((x & 0x00ff0000) >> 8) | ((x & 0xff000000) >> 24)); } |