diff --git a/NEWS b/NEWS index e8f0345b9..398685b13 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.20.9 (not yet released) +* fix byte order detection on FreeBSD/aarch64 ver 0.20.8 (2017/05/19) * output diff --git a/src/system/ByteOrder.hxx b/src/system/ByteOrder.hxx index d4cf454c9..edeeb31c3 100644 --- a/src/system/ByteOrder.hxx +++ b/src/system/ByteOrder.hxx @@ -52,6 +52,15 @@ # define IS_LITTLE_ENDIAN false # define IS_BIG_ENDIAN true # endif +#elif defined(__BYTE_ORDER__) +/* GCC-specific macros */ +# if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# define IS_LITTLE_ENDIAN true +# define IS_BIG_ENDIAN false +# else +# define IS_LITTLE_ENDIAN false +# define IS_BIG_ENDIAN true +# endif #else /* generic compile-time check */ # include