1
0
Fork 0

Fix: OpenBSD endianness detection

pull/8085/head
Charlène 2020-02-11 12:45:36 +01:00 committed by Charles Pigott
parent fd106cf67b
commit 0643a3627f
1 changed files with 7 additions and 0 deletions

View File

@ -33,6 +33,13 @@
# else # else
# define TTD_ENDIAN TTD_BIG_ENDIAN # define TTD_ENDIAN TTD_BIG_ENDIAN
# endif # 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) #elif !defined(TESTING)
# include <sys/param.h> # include <sys/param.h>
# if __BYTE_ORDER == __LITTLE_ENDIAN # if __BYTE_ORDER == __LITTLE_ENDIAN