From 1c7d6584a7811b7785ae5c1e378f14b5ba0971cf Mon Sep 17 00:00:00 2001 From: takeshi_hoshina Date: Mon, 2 Nov 2020 11:07:33 +0900 Subject: basesystem-jj recipes --- ...01-net-snmp-fix-compile-error-disable-des.patch | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 external/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch (limited to 'external/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch') diff --git a/external/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch b/external/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch new file mode 100644 index 00000000..33a1e745 --- /dev/null +++ b/external/meta-openembedded/meta-networking/recipes-protocols/net-snmp/net-snmp/0001-net-snmp-fix-compile-error-disable-des.patch @@ -0,0 +1,62 @@ +From 383e67e359b89abe0440597ce414297892ade511 Mon Sep 17 00:00:00 2001 +From: Changqing Li +Date: Tue, 26 Feb 2019 14:26:07 +0800 +Subject: [PATCH] net-snmp: fix compile error with --disable-des + +| scapi.c: In function 'sc_encrypt': +| scapi.c:1256:5: error: 'pad_size' undeclared (first use in this function); did you mean 'dysize'? +| pad_size = pai->pad_size; +| ^~~~~~~~ +| dysize + +pad_size is defined only without --disable-des +[snip] +#ifndef NETSNMP_DISABLE_DES + int pad, plast, pad_size = 0; + +but used when disable-des, +[snip] + QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); + } + pad_size = pai->pad_size; + + memset(my_iv, 0, sizeof(my_iv)); + +#ifndef NETSNMP_DISABLE_DES + if (USM_CREATE_USER_PRIV_DES == (pai->type & USM_PRIV_MASK_ALG)) { + + /* + +fix by move it into #ifndef NETSNMP_DISABLE_DES + +Upstream-Status: Submitted [https://sourceforge.net/p/net-snmp/bugs/2927/] + +Signed-off-by: Changqing Li +--- + snmplib/scapi.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/snmplib/scapi.c b/snmplib/scapi.c +index 8ad1d70d90..8c6882d9ab 100644 +--- a/snmplib/scapi.c ++++ b/snmplib/scapi.c +@@ -1251,7 +1251,6 @@ sc_encrypt(const oid * privtype, size_t privtypelen, + + QUITFUN(SNMPERR_GENERR, sc_encrypt_quit); + } +- pad_size = pai->pad_size; + + memset(my_iv, 0, sizeof(my_iv)); + +@@ -1261,6 +1260,8 @@ sc_encrypt(const oid * privtype, size_t privtypelen, + /* + * now calculate the padding needed + */ ++ ++ pad_size = pai->pad_size; + pad = pad_size - (ptlen % pad_size); + plast = (int) ptlen - (pad_size - pad); + if (pad == pad_size) +-- +2.26.2 + -- cgit 1.2.3-korg