在byte_order.h中增加对openwrt的aarch64的支持
Opened this issue · 0 comments
在树梅派上测试通过
在原文件39行的if的小端选择里面增加 defined(aarch64) 即可
#if (defined(__BYTE_ORDER) && defined(__LITTLE_ENDIAN) &&
__BYTE_ORDER == __LITTLE_ENDIAN) ||
defined(CPU_IA32) || defined(CPU_X64) ||
defined(__ia64) || defined(ia64) || defined(alpha) || defined(_M_ALPHA) ||
defined(vax) || defined(MIPSEL) || defined(ARM) || defined(arm) || defined(aarch64)
define CPU_LITTLE_ENDIAN
define IS_BIG_ENDIAN 0
define IS_LITTLE_ENDIAN 1
#elif (defined(__BYTE_ORDER) && defined(__BIG_ENDIAN) &&
__BYTE_ORDER == __BIG_ENDIAN) ||
defined(__sparc) || defined(sparc) || defined(sparc) ||
defined(_ARCH_PPC) || defined(_ARCH_PPC64) || defined(_POWER) ||
defined(POWERPC) || defined(POWERPC) || defined(__powerpc) ||
defined(powerpc) || defined(powerpc64) || defined(ppc) ||
defined(__hpux) || defined(_MIPSEB) || defined(mc68000) ||
defined(s390) || defined(s390x) || defined(sel)
define CPU_BIG_ENDIAN
define IS_BIG_ENDIAN 1
define IS_LITTLE_ENDIAN 0
#else
error "Can't detect CPU architechture"
#endif