This patch is needed to make bcrc32 work on systems which don't define
__LITTLE_ENDIAN, like FreeBSD.
*/
uint32_t bcrc32(unsigned char*buf, int len)
{
*/
uint32_t bcrc32(unsigned char*buf, int len)
{
+# ifdef HAVE_LITTLE_ENDIAN
# define DO_CRC(x) crc = tab[0][(crc ^ (x)) & 255 ] ^ (crc >> 8)
# define DO_CRC4 crc = tab[3][(crc) & 255 ] ^ \
tab[2][(crc >> 8) & 255 ] ^ \
# define DO_CRC(x) crc = tab[0][(crc ^ (x)) & 255 ] ^ (crc >> 8)
# define DO_CRC4 crc = tab[3][(crc) & 255 ] ^ \
tab[2][(crc >> 8) & 255 ] ^ \