From: Sebastian Harl Date: Sat, 12 May 2007 11:47:19 +0000 (+0200) Subject: perl plugin: Work around a redefinition of DEBUG in perl.h. X-Git-Tag: collectd-4.0.0~42^2~2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=22a81e3a5ba8e38efe90779d10d8ed6020270c82;p=collectd.git 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 --- 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