=== modified file 'include/snmp_debug.h' --- include/snmp_debug.h 2010-11-21 04:40:05 +0000 +++ include/snmp_debug.h 2010-11-30 09:06:48 +0000 @@ -5,5 +5,6 @@ #define SQUID_SNMP_DEBUG_H SQUIDCEXTERN void snmplib_debug(int, const char *,...) PRINTF_FORMAT_ARG2; +SQUIDCEXTERN void (*snmplib_debug_hook) (int, char *,...); #endif /* SQUID_SNMP_DEBUG_H */ === modified file 'src/snmp_core.cc' --- src/snmp_core.cc 2010-08-01 06:16:06 +0000 +++ src/snmp_core.cc 2010-11-30 09:19:06 +0000 @@ -86,7 +86,6 @@ static oid *snmpCreateOid(int length,...); mib_tree_entry * snmpLookupNodeStr(mib_tree_entry *entry, const char *str); int snmpCreateOidFromStr(const char *str, oid **name, int *nl); -SQUIDCEXTERN void (*snmplib_debug_hook) (int, char *); static oid *static_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn); static oid *time_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn); static oid *peer_Inst(oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn); @@ -99,7 +98,9 @@ static oid_ParseFn *snmpTreeGet(oid * Current, snint CurrentLen); static mib_tree_entry *snmpTreeEntry(oid entry, snint len, mib_tree_entry * current); static mib_tree_entry *snmpTreeSiblingEntry(oid entry, snint len, mib_tree_entry * current); -static void snmpSnmplibDebug(int lvl, char *buf); + +// This is a callback used by snmplib (a C library). Thanks Sun... +extern "C" void snmpSnmplibDebug(int lvl, char *buf); /* * The functions used during startup: