From 19e75743173cb8d49d49fd685b8e0249e83cc820 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Wed, 8 Sep 2021 20:39:42 -0700 Subject: [PATCH] libsnmp: Fix the build against OpenSSL 3.0 Fixes: https://github.com/net-snmp/net-snmp/issues/343 Origin: upstream, https://github.com/net-snmp/net-snmp/commit/19e75743173cb8d49d49fd685b8e0249e83cc820 Bug: https://github.com/net-snmp/net-snmp/issues/343 Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/net-snmp/+bug/1945960 Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1006511 --- snmplib/snmp_openssl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/snmplib/snmp_openssl.c b/snmplib/snmp_openssl.c index c092a007a..eb4856c57 100644 --- a/snmplib/snmp_openssl.c +++ b/snmplib/snmp_openssl.c @@ -899,6 +899,11 @@ netsnmp_openssl_cert_issued_by(X509 *issuer, X509 *cert) #ifndef NETSNMP_FEATURE_REMOVE_OPENSSL_ERR_LOG +#ifndef ERR_GET_FUNC +/* removed in OpenSSL 3.0 */ +#define ERR_GET_FUNC(e) -1 +#endif + void netsnmp_openssl_err_log(const char *prefix) { -- 2.32.0