$NetBSD: patch-src_hyperloglog.c,v 1.2 2020/10/27 10:22:34 adam Exp $ Fix the case of the missing llroundl on NetBSD. Patch by Matthias Petermann. --- src/hyperloglog.c.orig 2020-10-27 07:12:01.000000000 +0000 +++ src/hyperloglog.c @@ -34,6 +34,16 @@ #include #include +#ifdef __NetBSD__ +#include +#if __NetBSD_Version__ < 799007200 +/* llroundl not present in NetBSD libm before 7.99.71 */ +long long int llroundl (long double x) { + return (long long int) roundl (x); +} +#endif +#endif + /* The Redis HyperLogLog implementation is based on the following ideas: * * * The use of a 64 bit hash function as proposed in [1], in order to estimate