summaryrefslogtreecommitdiff
path: root/res/snmp
diff options
context:
space:
mode:
authorLuigi Rizzo <rizzo@icir.org>2007-12-19 08:12:33 +0000
committerLuigi Rizzo <rizzo@icir.org>2007-12-19 08:12:33 +0000
commit094ec6521de739deda2aa0acf49132c73c1932ad (patch)
treef596a5690f037a45b2f6fee2c0fa40d995ce04ab /res/snmp
parent489a648d5dc62c9f49f257c93d76807c61f7aa93 (diff)
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
Diffstat (limited to 'res/snmp')
-rw-r--r--res/snmp/agent.c29
1 files changed, 29 insertions, 0 deletions
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 <net-snmp/net-snmp-config.h>
#include <net-snmp/net-snmp-includes.h>
#include <net-snmp/agent/net-snmp-agent-includes.h>