diff --git a/modules/xmpp/sha.c b/modules/xmpp/sha.c index e1ca80f7c3d..fcdc313dc6e 100644 --- a/modules/xmpp/sha.c +++ b/modules/xmpp/sha.c @@ -49,6 +49,7 @@ #include #include #include +#include "../../endianness.h" #ifndef MACOS # include @@ -104,7 +105,7 @@ sha_hash(int *data, int *hash) for (t=0; t<16; t++) { -#ifndef WORDS_BIGENDIAN +#ifndef __IS_BIG_ENDIAN W[t]=switch_endianness(data[t]); #else W[t]=data[t]; @@ -244,7 +245,7 @@ char *shahash(const char *str) for (i=0; i<14; i++) ((int*)read_buffer)[i]=0; } -#ifndef WORDS_BIGENDIAN +#ifndef __IS_BIG_ENDIAN for (i=0; i<8; i++) { read_buffer[56+i]=(char)(length>>(56-(i*8))) & 0xff;