From: Martin Simmons Date: Thu, 30 Dec 2010 17:37:44 +0000 (+0100) Subject: Make new crc32.c work on FreeBSD X-Git-Tag: Release-7.0.0~1247 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f6d78b0214b7cb4a67796da8536e7f61fc08dbaa;p=bacula%2Fbacula Make new crc32.c work on FreeBSD This patch is needed to make bcrc32 work on systems which don't define __LITTLE_ENDIAN, like FreeBSD. --- diff --git a/bacula/src/lib/crc32.c b/bacula/src/lib/crc32.c index a7cb2afca1..847b1404f2 100644 --- a/bacula/src/lib/crc32.c +++ b/bacula/src/lib/crc32.c @@ -360,7 +360,7 @@ tole(0xccb0a91fL), tole(0x740cce7aL), tole(0x66b96194L), tole(0xde0506f1L)}, */ uint32_t bcrc32(unsigned char*buf, int len) { -# ifdef __LITTLE_ENDIAN +# 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 ] ^ \