From 1c64c42ada94c7eb79fb536a3b46e30fcb360a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Minisini?= Date: Tue, 20 Sep 2022 15:06:35 +0200 Subject: [PATCH] Make 'gb.hash' compile on non-64 bits architectures. [GB.HASH] * BUG: Make 'gb.hash' compile on non-64 bits architectures. --- main/lib/hash/hash.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/main/lib/hash/hash.c b/main/lib/hash/hash.c index 923210c0b..acc8d76dd 100644 --- a/main/lib/hash/hash.c +++ b/main/lib/hash/hash.c @@ -38,6 +38,13 @@ #define CONFIG_MD5_SMALL 0 #define CONFIG_SHA3_SMALL 0 +#if !(ULONG_MAX > 0xffffffff) +static uint64_t FAST_FUNC bb_bswap_64(uint64_t x) +{ + return bswap_64(x); +} +#endif + /* gcc 4.2.1 optimizes rotr64 better with inline than with macro * (for rotX32, there is no difference). Why? My guess is that * macro requires clever common subexpression elimination heuristics