--- asterisk-1.8.7.1-original/include/asterisk/compat.h 2010-09-28 21:18:43.000000000 +0300 +++ asterisk-1.8.7.1/include/asterisk/compat.h 2011-10-27 21:18:19.920005060 +0300 @@ -168,7 +168,7 @@ #define LITTLE_ENDIAN 1234 #define BIG_ENDIAN 4321 -#ifdef __sparc__ +#if defined(__sparc__) || defined(__arm__) #define BYTE_ORDER BIG_ENDIAN #else #define BYTE_ORDER LITTLE_ENDIAN --- asterisk-1.8.7.1-original/include/asterisk/unaligned.h 2010-08-17 22:34:06.000000000 +0300 +++ asterisk-1.8.7.1/include/asterisk/unaligned.h 2011-10-27 21:25:53.040005084 +0300 @@ -68,7 +68,7 @@ pp->d = datum; } -#elif defined(SOLARIS) && defined(__sparc__) +#elif (defined(SOLARIS) && defined(__sparc__)) || defined(__arm__) static inline uint64_t get_unaligned_uint64(const void *p) { const unsigned char *cp = p; --- asterisk-1.8.7.1-original/main/utils.c 2011-06-09 17:06:42.000000000 +0300 +++ asterisk-1.8.7.1/main/utils.c 2011-10-27 21:27:18.110005087 +0300 @@ -1666,7 +1666,7 @@ } result = (*pool_head)->base + (*pool_head)->used; -#ifdef __sparc__ +#if defined(__sparc__) || defined(__arm__) /* SPARC requires that the allocation field be aligned. */ if ((long) result % sizeof(ast_string_field_allocation)) { result++; @@ -1747,7 +1747,7 @@ } } else { target = (*pool_head)->base + (*pool_head)->used + sizeof(ast_string_field_allocation); -#ifdef __sparc__ +#if defined(__sparc__) || defined(__arm__) if ((long) target % sizeof(ast_string_field_allocation)) { target++; space--;