Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ccan/endian.h: Only define __{BIG,LITTLE}_ENDIAN if undefined.
When both endian.h and ccan/endian/endian.h are included, we can have __{BIG,LITTLE}_ENDIAN redefined when compiling with clang on FreeBSD. Clang and gcc have moved to a predefine for endian orders. glibc defines these the same as they are defied here, but that's an unsafe assumption to make. Instead, only define them when __LITTLE_ENDIAN not defined as a fallback to when the host does not define them in the standard system headers. Signed-off-by: Warner Losh <[email protected]>
- Loading branch information