* This file contains part of linux kernel implementation of crc32
* kernel version 2.6.32
*/
+#include <endian.h>
#include <libcfs/libcfs.h>
#define CRCPOLY_LE 0xedb88320
#define CRC_LE_BITS 8
const unsigned int *b = (unsigned int *)p;
const unsigned int *tab = crc32table_le;
-# ifdef __LITTLE_ENDIAN
+# if __BYTE_ORDER == __LITTLE_ENDIAN
# define DO_CRC(x) crc = tab[(crc ^ (x)) & 255] ^ (crc>>8)
# else
# define DO_CRC(x) crc = tab[((crc >> 24) ^ (x)) & 255] ^ (crc<<8)