summaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2012-01-09 17:07:11 -0500
committerStephen Gallagher <sgallagh@redhat.com>2012-01-09 20:25:06 -0500
commit866ca0b4fb3e3e2f4631c769c56652d3176ca648 (patch)
tree0d0a1c80c412e3f7d2972d3f12b93a33fa61abff /src/util
parent8df169fdffb564ec932fede4216a123a71f1cc9a (diff)
downloadsssd-866ca0b4fb3e3e2f4631c769c56652d3176ca648.tar.gz
sssd-866ca0b4fb3e3e2f4631c769c56652d3176ca648.tar.bz2
sssd-866ca0b4fb3e3e2f4631c769c56652d3176ca648.zip
util: Fix murmurhash3 on machines with old glibc
Diffstat (limited to 'src/util')
-rw-r--r--src/util/murmurhash3.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/util/murmurhash3.c b/src/util/murmurhash3.c
index c14cd7ce..4bd4dc71 100644
--- a/src/util/murmurhash3.c
+++ b/src/util/murmurhash3.c
@@ -11,6 +11,16 @@
#include <endian.h>
#include <string.h>
+/* 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));