From 094ec6521de739deda2aa0acf49132c73c1932ad Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Wed, 19 Dec 2007 08:12:33 +0000 Subject: make netsmp build under AST_DEVMODE. Description, included in the source, is below. I should note that the PACKAGE_* macros that asterisk defines in autoconfig.h are not used anywhere in the tree so they should just be removed. /* * There is some collision collision between netsmp and asterisk names, * causing build under AST_DEVMODE to fail. * * The following PACKAGE_* macros are one place. * Also netsnmp has an improper check for HAVE_DMALLOC_H, using * #if HAVE_DMALLOC_H instead of #ifdef HAVE_DMALLOC_H * As a countermeasure we define it to 0, however this will fail * when the proper check is implemented. */ No git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93875 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/snmp/agent.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'res/snmp/agent.c') diff --git a/res/snmp/agent.c b/res/snmp/agent.c index 035c4945d..aace4623a 100644 --- a/res/snmp/agent.c +++ b/res/snmp/agent.c @@ -18,6 +18,35 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") +/* + * There is some collision collision between netsmp and asterisk names, + * causing build under AST_DEVMODE to fail. + * + * The following PACKAGE_* macros are one place. + * Also netsnmp has an improper check for HAVE_DMALLOC_H, using + * #if HAVE_DMALLOC_H instead of #ifdef HAVE_DMALLOC_H + * As a countermeasure we define it to 0, however this will fail + * when the proper check is implemented. + */ +#ifdef PACKAGE_NAME +#undef PACKAGE_NAME +#endif +#ifdef PACKAGE_BUGREPORT +#undef PACKAGE_BUGREPORT +#endif +#ifdef PACKAGE_STRING +#undef PACKAGE_STRING +#endif +#ifdef PACKAGE_TARNAME +#undef PACKAGE_TARNAME +#endif +#ifdef PACKAGE_VERSION +#undef PACKAGE_VERSION +#endif +#ifndef HAVE_DMALLOC_H +#define HAVE_DMALLOC_H 0 /* XXX we shouldn't do this */ +#endif + #include #include #include -- cgit v1.2.3