mirror of
https://github.com/linux-sunxi/u-boot-sunxi.git
synced 2024-02-12 11:16:03 +08:00
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.
This commit is contained in:
@ -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
|
||||||
|
Reference in New Issue
Block a user