diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/endian_type.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/endian_type.hpp b/src/core/endian_type.hpp index dbb7faec6..cb3e348b4 100644 --- a/src/core/endian_type.hpp +++ b/src/core/endian_type.hpp @@ -29,11 +29,11 @@ #if defined(WIN32) || defined(__OS2__) || defined(WIN64) #define TTD_ENDIAN TTD_LITTLE_ENDIAN #elif !defined(TESTING) - /* Else include endian[target/host].h, which has the endian-type, autodetected by the Makefile */ - #if defined(STRGEN) || defined(SETTINGSGEN) - #include "endian_host.h" + #include <sys/param.h> + #if __BYTE_ORDER == __LITTLE_ENDIAN + #define TTD_ENDIAN TTD_LITTLE_ENDIAN #else - #include "endian_target.h" + #define TTD_ENDIAN TTD_BIG_ENDIAN #endif #endif /* WIN32 || __OS2__ || WIN64 */ |