2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-29 05:28:00 +00:00

Update fxhash constants

The fxhash implementation was missing a constant for 32-bit platforms.
This has been fixed.  Constant for 64-bit platform was update to match
the current Rust constants.
This commit is contained in:
Ondřej Surý 2025-08-26 07:56:03 +02:00
parent 11bbef0eec
commit 24ba4ba3ad
No known key found for this signature in database
GPG Key ID: 2820F37E873DEA41

View File

@ -32,7 +32,11 @@
#include <isc/bit.h>
/* The constant K from Rust's fxhash */
#define K 0x9e3779b97f4a7c15ull
#if SIZE_MAX == UINT64_MAX
#define K UINT64_C(0x517cc1b727220a95)
#else
#define K UINT32_C(0x9e3779b9)
#endif
static inline size_t
fx_add_to_hash(size_t hash, size_t i) {