When building the Linux userspace binaries, the external system
headers may have already defined values for the __LITTLE_ENDIAN and
__BIG_ENDIAN constants.
Fix by retaining the existing values if already defined, since the
actual values of these constants do not matter.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
* Little-endian systems should define BYTE_ORDER as LITTLE_ENDIAN.
* This constant is intended to be used only at compile time.
*/
+#ifndef __LITTLE_ENDIAN
#define __LITTLE_ENDIAN 0x44332211UL
+#endif
/** Constant representing big-endian byte order
*
* Big-endian systems should define BYTE_ORDER as BIG_ENDIAN.
* This constant is intended to be used only at compile time.
*/
+#ifndef __BIG_ENDIAN
#define __BIG_ENDIAN 0x11223344UL
+#endif
#include "bits/endian.h"