aboutsummaryrefslogtreecommitdiffstats
path: root/libhashsum_init_sha2_hasher.c
diff options
context:
space:
mode:
Diffstat (limited to 'libhashsum_init_sha2_hasher.c')
-rw-r--r--libhashsum_init_sha2_hasher.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libhashsum_init_sha2_hasher.c b/libhashsum_init_sha2_hasher.c
index ab64517..9246e48 100644
--- a/libhashsum_init_sha2_hasher.c
+++ b/libhashsum_init_sha2_hasher.c
@@ -1,5 +1,6 @@
/* See LICENSE file for copyright and license details. */
#include "common.h"
+#ifdef SUPPORT_SHA2
LIBHASHSUM_1_NONNULL_
@@ -91,3 +92,16 @@ libhashsum_init_sha2_hasher(struct libhashsum_hasher *this, unsigned algobits, s
libsha2_init(&this->state.sha2.s, algo);
return 0;
}
+
+
+#else
+int
+libhashsum_init_sha2_hasher(struct libhashsum_hasher *this, unsigned algobits, size_t hashbits)
+{
+ (void) this;
+ (void) algobits;
+ (void) hashbits;
+ errno = ENOSYS;
+ return -1;
+}
+#endif