summaryrefslogtreecommitdiff
path: root/include/SDL_endian.h
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2010-07-18 11:23:34 -0700
committerSam Lantinga <slouken@libsdl.org>2010-07-18 11:23:34 -0700
commit6c561f1250f5ab150322169d97b93f05651cfe4d (patch)
treea9f329749256513546341e9cb5b279d57d8e9338 /include/SDL_endian.h
parent1e6dccf53c36ed3ccf1a6cf78ac9bb7ba29af678 (diff)
downloadsdl-6c561f1250f5ab150322169d97b93f05651cfe4d.tar.gz
RedHat patch: SDL-1.2.14-byteorder.patch
Diffstat (limited to 'include/SDL_endian.h')
-rw-r--r--include/SDL_endian.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/SDL_endian.h b/include/SDL_endian.h
index 39540f126..de69e32d7 100644
--- a/include/SDL_endian.h
+++ b/include/SDL_endian.h
@@ -40,6 +40,10 @@
/*@}*/
#ifndef SDL_BYTEORDER /* Not defined in SDL_config.h? */
+#ifdef __linux__
+#include <endian.h>
+#define SDL_BYTEORDER __BYTE_ORDER
+#else /* __linux __ */
#if defined(__hppa__) || \
defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
(defined(__MIPS__) && defined(__MISPEB__)) || \
@@ -49,6 +53,7 @@
#else
#define SDL_BYTEORDER SDL_LIL_ENDIAN
#endif
+#endif /* __linux __ */
#endif /* !SDL_BYTEORDER */