diff options
author | Eric Anholt <anholt@freebsd.org> | 2006-01-19 00:06:57 +0000 |
---|---|---|
committer | Eric Anholt <anholt@freebsd.org> | 2006-01-19 00:06:57 +0000 |
commit | adce1f16e0d815e5c762407da3544a7d2eff9303 (patch) | |
tree | 0c4c3105c8433cb3d76d17ac5a50a862cb62cace /GL/glx/indirect_util.c | |
parent | 1c3f8727b2349c9b988eaa744f11366322d42538 (diff) |
Only try to use byteswap.h on linux. Assume that everyone else (thinking of
BSDs here) has sys/endian.h, and use macros as appropriate for the
names. This should probably be in a gloabl header.
Diffstat (limited to 'GL/glx/indirect_util.c')
-rw-r--r-- | GL/glx/indirect_util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/GL/glx/indirect_util.c b/GL/glx/indirect_util.c index d969cc298..bf0ba66f2 100644 --- a/GL/glx/indirect_util.c +++ b/GL/glx/indirect_util.c @@ -26,7 +26,14 @@ #include <X11/Xmd.h> #include <GL/gl.h> #include <GL/glxproto.h> +#ifdef __linux__ #include <byteswap.h> +#else +#include <sys/endian.h> +#define bswap_16 bswap16 +#define bswap_32 bswap32 +#define bswap_64 bswap64 +#endif #include <inttypes.h> #include "indirect_size.h" #include "indirect_size_get.h" |