diff --git a/libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h b/libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h index 35ab553..29d954c 100644 --- a/libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h +++ b/libbuild2-autoconf/libbuild2/autoconf/checks/BYTE_ORDER.h @@ -43,11 +43,15 @@ # define BIG_ENDIAN 4321 # define LITTLE_ENDIAN 1234 # define BYTE_ORDER LITTLE_ENDIAN -# elif defined(__BYTE_ORDER__) && \ - defined(__ORDER_BIG_ENDIAN__) && \ - defined(__ORDER_LITTLE_ENDIAN__) - /* GCC, Clang (and others, potentially). - */ +# endif +#endif + +/* Fallback: GCC, Clang (specifically apple-silicon and others, potentially). + */ +#ifndef BYTE_ORDER +# if defined(__BYTE_ORDER__) && \ + defined(__ORDER_BIG_ENDIAN__) && \ + defined(__ORDER_LITTLE_ENDIAN__) # define BYTE_ORDER __BYTE_ORDER__ # define BIG_ENDIAN __ORDER_BIG_ENDIAN__ # define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__