diff --git a/net-snmp-5.5.0_gcc45.patch b/net-snmp-5.5.0_gcc45.patch new file mode 100644 index 0000000..74e0ef8 --- /dev/null +++ b/net-snmp-5.5.0_gcc45.patch @@ -0,0 +1,38 @@ +Index: agent/mibgroup/hardware/sensors/hw_sensors.c +=================================================================== +--- agent/mibgroup/hardware/sensors/hw_sensors.c.orig ++++ agent/mibgroup/hardware/sensors/hw_sensors.c +@@ -107,6 +107,7 @@ static int + _sensor_load( void ) + { + netsnmp_sensor_arch_load( NULL, NULL ); ++ return 0; + } + + /* +Index: agent/mibgroup/ip-mib/data_access/defaultrouter_common.c +=================================================================== +--- agent/mibgroup/ip-mib/data_access/defaultrouter_common.c.orig ++++ agent/mibgroup/ip-mib/data_access/defaultrouter_common.c +@@ -169,7 +169,7 @@ netsnmp_access_defaultrouter_entry_creat + + rc = netsnmp_arch_defaultrouter_entry_init(entry); + if (SNMP_ERR_NOERROR != rc) { +- DEBUGMSGT(("access:defaultrouter:create","error %d in arch init\n")); ++ DEBUGMSGT(("access:defaultrouter:create","error %d in arch init\n", rc)); + netsnmp_access_defaultrouter_entry_free(entry); + entry = NULL; + } +Index: agent/mibgroup/ucd-snmp/pass.c +=================================================================== +--- agent/mibgroup/ucd-snmp/pass.c.orig ++++ agent/mibgroup/ucd-snmp/pass.c +@@ -588,7 +588,7 @@ setPass(int action, + buf[ sizeof(buf)-1 ] = 0; + break; + } +- strncat(passthru->command, buf, sizeof(passthru->command)); ++ strncat(passthru->command, buf, sizeof(passthru->command)-1); + passthru->command[ sizeof(passthru->command)-1 ] = 0; + DEBUGMSGTL(("ucd-snmp/pass", "pass-running: %s", + passthru->command)); diff --git a/net-snmp.changes b/net-snmp.changes index 0d4d205..be27225 100644 --- a/net-snmp.changes +++ b/net-snmp.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Mar 1 20:45:50 UTC 2010 - aj@suse.de + +- Fix code errors found by gcc 4.5 + ------------------------------------------------------------------- Wed Feb 3 11:03:39 CET 2010 - jdelvare@suse.de diff --git a/net-snmp.spec b/net-snmp.spec index 105ba13..ed7060c 100644 --- a/net-snmp.spec +++ b/net-snmp.spec @@ -20,7 +20,7 @@ Name: net-snmp Version: 5.5 -Release: 2 +Release: 3 # License: BSD3c(or similar) ; MIT License (or similar) Group: Productivity/Networking/Other @@ -80,6 +80,7 @@ Patch10: net-snmp-5.4.2_snmpconf-selinux.patch Patch11: net-snmp-5.4.2_velocity-mib.patch Patch12: net-snmp-5.4.2.1-rpm4.7.patch Patch13: net-snmp-5.5.0_use_lmsensors_v3.patch +Patch14: net-snmp-5.5.0_gcc45.patch # Summary: SNMP Daemon @@ -229,6 +230,7 @@ Authors: %patch11 %patch12 %patch13 +%patch14 find -name "CVS" -type d | xargs -r %{__rm} -rfv find -name ".cvsignore" | xargs -r %{__rm} -fv