From 866ca0b4fb3e3e2f4631c769c56652d3176ca648 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 9 Jan 2012 17:07:11 -0500 Subject: util: Fix murmurhash3 on machines with old glibc --- src/util/murmurhash3.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/util/murmurhash3.c b/src/util/murmurhash3.c index c14cd7ce5..4bd4dc710 100644 --- a/src/util/murmurhash3.c +++ b/src/util/murmurhash3.c @@ -11,6 +11,16 @@ #include #include +/* support RHEL5 lack of definitions */ +#ifndef le32toh +# if __BYTE_ORDER == __LITTLE_ENDIAN +# define le32toh(x) (x) +# else +# define le32toh(x) __bswap_32 (x) +# endif +#endif + + static uint32_t rotl(uint32_t x, int8_t r) { return (x << r) | (x >> (32 - r)); -- cgit