Sophie

Sophie

distrib > Mandriva > current > x86_64 > by-pkgid > b53b75197300b47975577c892e1b6fa8 > files > 12

net-snmp-5.5-7.1mdv2010.2.src.rpm

543352:  'make test' fails on big endian system

Source: upstream, SVN rev. 17860

Fix udpTable indexes.
Index: net-snmp/agent/mibgroup/mibII/udpTable.c
===================================================================
--- net-snmp/agent/mibgroup/mibII/udpTable.c	(revision 17859)
+++ net-snmp/agent/mibgroup/mibII/udpTable.c	(revision 17860)
@@ -361,7 +361,7 @@
 {
     UDPTABLE_ENTRY_TYPE	 *entry = (UDPTABLE_ENTRY_TYPE *)*loop_context;
     long port;
-    in_addr_t addr;
+    long addr;
 
     if (!entry)
         return NULL;
@@ -376,7 +376,7 @@
 #else
     addr = UDP_ADDRESS_TO_NETWORK_ORDER((in_addr_t)entry->UDPTABLE_LOCALADDRESS);
     snmp_set_var_value(index, (u_char *)&addr,
-                                 sizeof(entry->UDPTABLE_LOCALADDRESS));
+                                 sizeof(addr));
 #endif
     port = UDP_PORT_TO_HOST_ORDER(entry->UDPTABLE_LOCALPORT);
     snmp_set_var_value(index->next_variable,