diff -Nru net-snmp-5.9.3+dfsg/debian/changelog net-snmp-5.9.3+dfsg/debian/changelog --- net-snmp-5.9.3+dfsg/debian/changelog 2023-02-16 23:16:57.000000000 +0000 +++ net-snmp-5.9.3+dfsg/debian/changelog 2023-02-17 05:12:56.000000000 +0000 @@ -1,3 +1,10 @@ +net-snmp (5.9.3+dfsg-2ubuntu3) lunar; urgency=medium + + * Fix build error in snmptrapd reconnection fix (LP: #1999711) + - d/p/snmptrapd-mysql-fix-build-error.patch + + -- Chengen Du Fri, 17 Feb 2023 05:12:56 +0000 + net-snmp (5.9.3+dfsg-2ubuntu2) lunar; urgency=medium * Fix snmptrapd reconnection issue after hitting MySQL wait_timeout diff -Nru net-snmp-5.9.3+dfsg/debian/patches/series net-snmp-5.9.3+dfsg/debian/patches/series --- net-snmp-5.9.3+dfsg/debian/patches/series 2023-02-16 23:14:28.000000000 +0000 +++ net-snmp-5.9.3+dfsg/debian/patches/series 2023-02-17 05:12:00.000000000 +0000 @@ -43,3 +43,4 @@ agent_set_null_varbind restore-support-for-long-dns-names.patch snmptrapd-mysql-reconnection-after-hitting-wait_timeout.patch +snmptrapd-mysql-fix-build-error.patch diff -Nru net-snmp-5.9.3+dfsg/debian/patches/snmptrapd-mysql-fix-build-error.patch net-snmp-5.9.3+dfsg/debian/patches/snmptrapd-mysql-fix-build-error.patch --- net-snmp-5.9.3+dfsg/debian/patches/snmptrapd-mysql-fix-build-error.patch 1970-01-01 00:00:00.000000000 +0000 +++ net-snmp-5.9.3+dfsg/debian/patches/snmptrapd-mysql-fix-build-error.patch 2023-02-17 05:12:49.000000000 +0000 @@ -0,0 +1,30 @@ +From: Bart Van Assche +Date: Mon Dec 5 19:19:40 2022 -0800 +Subject: apps/snmptrapd_sql: Fix a recently introduced build error + + Fixes: 62b2907a46c9 ("apps/snmptrap: Fix mysql reconnection after hitting wait_timeout") + +Origin: upstream, https://github.com/net-snmp/net-snmp/commit/a1c80f7778da0aaadfb3fc44b213586f632d8d5d +Bug-Ubuntu: https://bugs.launchpad.net/bugs/1999711 +Last-Update: 2023-02-17 + +--- net-snmp-5.9.3+dfsg.orig/apps/snmptrapd_sql.c ++++ net-snmp-5.9.3+dfsg/apps/snmptrapd_sql.c +@@ -248,7 +248,7 @@ netsnmp_sql_disconnected(void) + } + } + +-static bool ++static int + netsnmp_sql_server_disconnected(int err) + { + // CR_SERVER_GONE_ERROR | CR_SERVER_LOST | ER_CLIENT_INTERACTION_TIMEOUT +@@ -1122,7 +1122,7 @@ _sql_process_queue(u_int dontcare, void + (void) netsnmp_mysql_connect(); + } + +- bool sql_has_connected = _sql.connected; ++ int sql_has_connected = _sql.connected; + + CONTAINER_FOR_EACH(_sql.queue, (netsnmp_container_obj_func*)_sql_save, + NULL);