From 66beb0127cfd6eea0394834be459af87407415d3 Mon Sep 17 00:00:00 2001 From: Lars Thegler Date: Mon, 12 Oct 2009 19:55:37 +0000 Subject: [PATCH] Avoid segfault on perl 5.10 PR: ports/139259 Submitted by: Vivek Khera Obtained from: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=537996 --- www/p5-CGI-SpeedyCGI/Makefile | 2 +- .../files/patch-src_speedy_perl.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 www/p5-CGI-SpeedyCGI/files/patch-src_speedy_perl.c diff --git a/www/p5-CGI-SpeedyCGI/Makefile b/www/p5-CGI-SpeedyCGI/Makefile index d3cb5ffd8cfd..3179c95efd69 100644 --- a/www/p5-CGI-SpeedyCGI/Makefile +++ b/www/p5-CGI-SpeedyCGI/Makefile @@ -7,7 +7,7 @@ PORTNAME= CGI-SpeedyCGI PORTVERSION= 2.22 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= www perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- diff --git a/www/p5-CGI-SpeedyCGI/files/patch-src_speedy_perl.c b/www/p5-CGI-SpeedyCGI/files/patch-src_speedy_perl.c new file mode 100644 index 000000000000..8b2ffeedb094 --- /dev/null +++ b/www/p5-CGI-SpeedyCGI/files/patch-src_speedy_perl.c @@ -0,0 +1,15 @@ +Author: Niko Tyni +Description: Closes: #537996 +The SvIV call crashes in on Perl 5.10.0 when warnings are +enabled and the value is undef. +--- src/speedy_perl.c ++++ src/speedy_perl.c +@@ -818,7 +818,7 @@ + my_call_sv(get_perlvar(&PERLVAR_RESET_GLOBALS)); + + /* Copy option values in from the perl vars */ +- if (SvIV(PERLVAL_OPTS_CHANGED)) { ++ if (SvTRUE(PERLVAL_OPTS_CHANGED)) { + int i; + for (i = 0; i < SPEEDY_NUMOPTS; ++i) { + OptRec *o = speedy_optdefs + i;