[collectd] perl compilation error

Sebastian Harl sh at tokkee.org
Mon Apr 28 15:32:22 CEST 2008


Hi,

On Mon, Apr 28, 2008 at 02:10:39PM +0200, Sebastian Harl wrote:
> On Mon, Apr 28, 2008 at 02:00:44PM +0200, Sebastian Harl wrote:
> > -	PERL_SYS_INIT3 (&argc, &argv, &environ);
> > +	{
> > +		/* make gcc on FreeBSD happy :-/ */
> > +		int dummy = PERL_SYS_INIT3 (&argc, &argv, &environ);
> > +	}
> 
> Damn... this will make gcc complain about an unused variable and thus
> fail again. Also, it doesn't work on x86 Linux, because PERL_SYS_INIT3()
> seems to "return" a pointer. :-(

Okay, here is another shot - could you please test the attached patch?

Just in case you don't know how to apply patches:
 - go to the top-level source directory
 - do: patch -p1 < my.patch
 - recompile

TIA,
Sebastian

-- 
Sebastian "tokkee" Harl +++ GnuPG-ID: 0x8501C7FC +++ http://tokkee.org/

Those who would give up Essential Liberty to purchase a little Temporary
Safety, deserve neither Liberty nor Safety.         -- Benjamin Franklin

-------------- next part --------------
diff --git a/src/perl.c b/src/perl.c
index 6d3326f..5460eb7 100644
--- a/src/perl.c
+++ b/src/perl.c
@@ -1364,6 +1364,9 @@ static int init_pi (int argc, char **argv)
 		exit (1);
 	}
 
+#ifdef __FREEBSD__
+	(void)
+#endif
 	PERL_SYS_INIT3 (&argc, &argv, &environ);
 
 	perl_threads = (c_ithread_list_t *)smalloc (sizeof (c_ithread_list_t));
-------------- 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/20080428/b1b0a789/attachment.pgp 


More information about the collectd mailing list