diff options
author | Justin Hibbits <chmeeedalf@gmail.com> | 2018-01-29 22:23:36 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2018-02-05 20:58:11 -0500 |
commit | f29aa23b54e26d212cc61c07bcbb66ed5d6f9704 (patch) | |
tree | a1875839d1407be990f50809870ee19237c896a4 /include/compiler.h | |
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.
Diffstat (limited to 'include/compiler.h')
-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 |