Skip to content
Snippets Groups Projects
Commit f29aa23b authored by Justin Hibbits's avatar Justin Hibbits Committed by Tom Rini
Browse files

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.
parent a4fa8114
No related branches found
No related tags found
No related merge requests found
...@@ -50,6 +50,9 @@ typedef unsigned long ulong; ...@@ -50,6 +50,9 @@ typedef unsigned long ulong;
#endif #endif
#ifdef __FreeBSD__ #ifdef __FreeBSD__
# include <sys/endian.h> /* htole32 and friends */ # 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__) #elif defined(__OpenBSD__)
# include <endian.h> # include <endian.h>
# define __BYTE_ORDER BYTE_ORDER # define __BYTE_ORDER BYTE_ORDER
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment