[collectd] [PATCH] perl plugin: Work around a redefinition of DEBUG in perl.h.
Sebastian Harl
sh at tokkee.org
Sat May 12 13:47:19 CEST 2007
Some versions of Perl define their own verion of DEBUG in perl.h overwriting
the definition found in plugin.h. This works around this issue.
Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
src/perl.c | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/perl.c b/src/perl.c
index 021d309..3be3762 100644
--- a/src/perl.c
+++ b/src/perl.c
@@ -26,7 +26,6 @@
#include "collectd.h"
#include "common.h"
-#include "plugin.h"
#include "configfile.h"
@@ -35,6 +34,14 @@
#include <XSUB.h>
+/* Some versions of Perl define their own version of DEBUG... :-/ */
+#ifdef DEBUG
+# undef DEBUG
+#endif /* DEBUG */
+
+/* ... while we want the definition found in plugin.h. */
+#include "plugin.h"
+
#define PLUGIN_INIT 0
#define PLUGIN_READ 1
#define PLUGIN_WRITE 2
--
1.4.4.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20070512/2821b06a/attachment.pgp
More information about the collectd
mailing list