From 70157e71bb2c154dd9b73f42c6257b704c91d91f Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 24 Jun 2025 13:58:32 -0500 Subject: [PATCH] Use weak symbol instead of #else skipping build. --- lib/hash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/hash.c b/lib/hash.c index 2ba40145..e828b30f 100644 --- a/lib/hash.c +++ b/lib/hash.c @@ -57,7 +57,7 @@ void hash_by_name(int fd, char *name, char *result) } // Builtin implementations -#else +#endif struct browns { unsigned *rconsttable32; @@ -306,7 +306,7 @@ static void hash_update(char *data, unsigned int len, } } -void hash_by_name(int fd, char *name, char *result) +void __attribute__((__weak__)) hash_by_name(int fd, char *name, char *result) { unsigned long long count[2]; int i, chunksize, digestlen, method; @@ -391,4 +391,3 @@ void hash_by_name(int fd, char *name, char *result) for (pp = (void *)libbuf; pp-(unsigned *)libbuf