From 3a73ab675a19e2ea29b4cb1385db0188ce4997f8 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 24 Aug 2024 11:26:42 +0200 Subject: Make algorithms optional MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libhashsum_init_sha0_hasher.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libhashsum_init_sha0_hasher.c') diff --git a/libhashsum_init_sha0_hasher.c b/libhashsum_init_sha0_hasher.c index 8f5854a..6efd8fc 100644 --- a/libhashsum_init_sha0_hasher.c +++ b/libhashsum_init_sha0_hasher.c @@ -1,5 +1,6 @@ /* See LICENSE file for copyright and license details. */ #include "common.h" +#ifdef SUPPORT_SHA0 LIBHASHSUM_1_NONNULL_ @@ -67,3 +68,14 @@ libhashsum_init_sha0_hasher(struct libhashsum_hasher *this) libsha1_init(&this->state.sha0.s, LIBSHA1_0); return 0; } + + +#else +int +libhashsum_init_sha0_hasher(struct libhashsum_hasher *this) +{ + (void) this; + errno = ENOSYS; + return -1; +} +#endif -- cgit v1.2.3-70-g09d2