From 1a797d7b74b9845f9e60bd89a3044425003d1a2b Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Fri, 8 Sep 2023 12:24:27 +0200 Subject: [PATCH] Win fix --- src/lib/third_party/include/binaryfusefilter.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/third_party/include/binaryfusefilter.h b/src/lib/third_party/include/binaryfusefilter.h index a5f9fc21391..991e28c67d9 100644 --- a/src/lib/third_party/include/binaryfusefilter.h +++ b/src/lib/third_party/include/binaryfusefilter.h @@ -29,7 +29,11 @@ static inline uint64_t binary_fuse_mix_split(uint64_t key, uint64_t seed) { return binary_fuse_murmur64(key + seed); } static inline uint64_t binary_fuse_rotl64(uint64_t n, unsigned int c) { +#ifdef _WIN32 + return(_rotr64(n, c)); +#else return (n << (c & 63)) | (n >> ((-c) & 63)); +#endif } static inline uint32_t binary_fuse_reduce(uint32_t hash, uint32_t n) { // http://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/