From a2ecd64c9dd9831335bb5de50ef02488e78092d2 Mon Sep 17 00:00:00 2001 From: Oleksandr Natalenko Date: Sun, 18 Mar 2018 10:38:09 +0100 Subject: [PATCH] ldns/host2str.c: fix build error with SSL disabled If --without-ssl option is given, the following error applies: === ./host2str.c:2017:74: error: unknown type name 'BIGNUM' ldns_print_bignum_b64_line(ldns_buffer* output, const char* label, const BIGNUM* num) ^ ./host2str.c:2025:11: warning: implicit declaration of function 'BN_bn2bin' is invalid in C99 [-Wimplicit-function-declaration] int i = BN_bn2bin(num, bignumbuf); === With that, ldns_print_bignum_b64_line() should be wrapped into HAVE_SSL ifdef. Signed-off-by: Oleksandr Natalenko --- host2str.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/host2str.c b/host2str.c index 73adb39a..f459c476 100644 --- a/host2str.c +++ b/host2str.c @@ -2012,6 +2012,7 @@ ldns_ed448_key2buffer_str(ldns_buffer *output, EVP_PKEY *p) } #endif +#if defined(HAVE_SSL) /** print one b64 encoded bignum to a line in the keybuffer */ static int ldns_print_bignum_b64_line(ldns_buffer* output, const char* label, const BIGNUM* num) @@ -2041,6 +2042,7 @@ ldns_print_bignum_b64_line(ldns_buffer* output, const char* label, const BIGNUM* LDNS_FREE(bignumbuf); return 1; } +#endif ldns_status ldns_key2buffer_str(ldns_buffer *output, const ldns_key *k) -- 2.47.3