Index: snmplib/mib.c =================================================================== --- snmplib/mib.c.orig +++ snmplib/mib.c @@ -1507,7 +1507,7 @@ sprint_realloc_gauge(u_char ** buf, size return 0; } } else { - sprintf(tmp, "%lu", *var->val.integer); + sprintf(tmp, "%u", (unsigned int)(*var->val.integer & 0xffffffff)); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) tmp)) { return 0; @@ -1571,7 +1571,7 @@ sprint_realloc_counter(u_char ** buf, si return 0; } } - sprintf(tmp, "%lu", *var->val.integer); + sprintf(tmp, "%u", (unsigned int)(*var->val.integer & 0xffffffff)); if (!snmp_strcat (buf, buf_len, out_len, allow_realloc, (const u_char *) tmp)) { return 0;