1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-25 15:39:09 +00:00

Fix: OpenBSD endianness detection

This commit is contained in:
Charlène
2020-02-11 12:45:36 +01:00
committed by Charles Pigott
parent 183c2a35bd
commit 2196cd3cf8

View File

@@ -33,6 +33,13 @@
# else
# define TTD_ENDIAN TTD_BIG_ENDIAN
# endif
#elif defined(__OpenBSD__)
# include <endian.h>
# if BYTE_ORDER == LITTLE_ENDIAN
# define TTD_ENDIAN TTD_LITTLE_ENDIAN
# else
# define TTD_ENDIAN TTD_BIG_ENDIAN
# endif
#elif !defined(TESTING)
# include <sys/param.h>
# if __BYTE_ORDER == __LITTLE_ENDIAN