diff options
author | Justin Hibbits | 2018-01-29 22:23:36 -0600 |
---|---|---|
committer | Tom Rini | 2018-02-05 20:58:11 -0500 |
commit | f29aa23b54e26d212cc61c07bcbb66ed5d6f9704 (patch) | |
tree | a1875839d1407be990f50809870ee19237c896a4 | |
parent | a4fa8114632a008735142b12a29de1771a115209 (diff) |
Fix FreeBSD endian checks
FreeBSD, like OpenBSD, uses BIG_ENDIAN, LITTLE_ENDIAN, and BYTE_ORDER,
whereas Linux and compatibles use __-prefixed names. Define the names
the same as the OpenBSD block below it.
-rw-r--r-- | include/compiler.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/compiler.h b/include/compiler.h index a43fb6a7386..957f4b5d49a 100644 --- a/include/compiler.h +++ b/include/compiler.h @@ -50,6 +50,9 @@ typedef unsigned long ulong; #endif #ifdef __FreeBSD__ # include <sys/endian.h> /* htole32 and friends */ +# define __BYTE_ORDER BYTE_ORDER +# define __LITTLE_ENDIAN LITTLE_ENDIAN +# define __BIG_ENDIAN BIG_ENDIAN #elif defined(__OpenBSD__) # include <endian.h> # define __BYTE_ORDER BYTE_ORDER |