]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
Fix FreeBSD endian checks
authorJustin Hibbits <chmeeedalf@gmail.com>
Tue, 30 Jan 2018 04:23:36 +0000 (22:23 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 6 Feb 2018 01:58:11 +0000 (20:58 -0500)
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.

include/compiler.h

index a43fb6a7386176ce556a60f04d0a2c19996e5745..957f4b5d49a872f4642f0c2d34587a1a0abe1252 100644 (file)
@@ -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