[collectd] [PATCH] src/Makefile.am: Define HAS_BOOL when building the perl plugin.

Sebastian Harl sh at tokkee.org
Mon Jun 16 23:03:17 CEST 2008


This works around a bug in Perl, which despite C99 defining the "bool" type
defines its own version of that type unless HAS_BOOL is defined... :-/

Signed-off-by: Sebastian Harl <sh at tokkee.org>
---
 src/Makefile.am |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 4e157fa..c852f34 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -510,6 +510,9 @@ endif
 if BUILD_PLUGIN_PERL
 pkglib_LTLIBRARIES += perl.la
 perl_la_SOURCES = perl.c
+# Despite C99 providing the "bool" type thru stdbool.h, Perl defines its own
+# version of that type if HAS_BOOL is not defined... *sigh*
+perl_la_CPPFLAGS = -DHAS_BOOL=1
 perl_la_CFLAGS  = $(AM_CFLAGS) \
 		$(PERL_CFLAGS) \
 		-DXS_VERSION=\"$(VERSION)\" -DVERSION=\"$(VERSION)\"
-- 
1.5.6.rc2

-------------- 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/20080616/ebfc022e/attachment.pgp 


More information about the collectd mailing list