From 22a81e3a5ba8e38efe90779d10d8ed6020270c82 Mon Sep 17 00:00:00 2001 From: Sebastian Harl Date: Sat, 12 May 2007 13:47:19 +0200 Subject: [PATCH] perl plugin: Work around a redefinition of DEBUG in perl.h. 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 --- src/perl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/perl.c b/src/perl.c index 021d3093..3be37621 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 +/* 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 -- 2.30.2