mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 06:58:05 +02:00
make endian code work on BSD
This commit is contained in:
parent
4ffbb81bd3
commit
edea87529e
1 changed files with 7 additions and 0 deletions
|
|
@ -355,7 +355,14 @@ extern GLboolean mach64UnbindContext( __DRIcontextPrivate *driContextPriv );
|
|||
/* ================================================================
|
||||
* Byte ordering
|
||||
*/
|
||||
#ifdef __linux__
|
||||
#include <endian.h>
|
||||
#else
|
||||
#include <sys/endian.h>
|
||||
#define __BYTE_ORDER BYTE_ORDER
|
||||
#define __LITTLE_ENDIAN LITTLE_ENDIAN
|
||||
#define __BIG_ENDIAN BIG_ENDIAN
|
||||
#endif
|
||||
|
||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
#define LE32_IN( x ) ( *(GLuint *)(x) )
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue