diff options
author | kuriyama <kuriyama@FreeBSD.org> | 2009-10-04 23:28:36 +0800 |
---|---|---|
committer | kuriyama <kuriyama@FreeBSD.org> | 2009-10-04 23:28:36 +0800 |
commit | 8dea1b5145cba9ccdadaff1e1e408f5a9a3839e6 (patch) | |
tree | 0cddd06371904c4d6e70fb376ecc5fe36872e0e6 /devel | |
parent | cdb6c397d4f3528f26135bf6ce3e3e3c234bcacb (diff) | |
download | freebsd-ports-gnome-8dea1b5145cba9ccdadaff1e1e408f5a9a3839e6.tar.gz freebsd-ports-gnome-8dea1b5145cba9ccdadaff1e1e408f5a9a3839e6.tar.zst freebsd-ports-gnome-8dea1b5145cba9ccdadaff1e1e408f5a9a3839e6.zip |
- Avoid pushing C NULLs into AV.
References: https://rt.cpan.org/Public/Bug/Display.html?id=50112
Reported by: tobez
Diffstat (limited to 'devel')
-rw-r--r-- | devel/p5-IO-KQueue/Makefile | 1 | ||||
-rw-r--r-- | devel/p5-IO-KQueue/files/patch-KQueue.xs | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/devel/p5-IO-KQueue/Makefile b/devel/p5-IO-KQueue/Makefile index 3a99bc79e78f..295484220f86 100644 --- a/devel/p5-IO-KQueue/Makefile +++ b/devel/p5-IO-KQueue/Makefile @@ -7,6 +7,7 @@ PORTNAME= IO-KQueue PORTVERSION= 0.32 +PORTREVISION= 1 CATEGORIES= devel perl5 MASTER_SITES= CPAN PKGNAMEPREFIX= p5- diff --git a/devel/p5-IO-KQueue/files/patch-KQueue.xs b/devel/p5-IO-KQueue/files/patch-KQueue.xs new file mode 100644 index 000000000000..c86846ceabd4 --- /dev/null +++ b/devel/p5-IO-KQueue/files/patch-KQueue.xs @@ -0,0 +1,24 @@ +--- KQueue.xs.orig 2009-09-29 10:42:31.000000000 +0200 ++++ KQueue.xs 2009-09-29 10:44:43.000000000 +0200 +@@ -107,7 +107,8 @@ kevent(kq, timeout=&PL_sv_undef) + av_push(array, newSViv(ke[i].flags)); + av_push(array, newSViv(ke[i].fflags)); + av_push(array, newSViv(ke[i].data)); +- av_push(array, SvREFCNT_inc(ke[i].udata)); ++ if (ke[i].udata) ++ av_push(array, SvREFCNT_inc(ke[i].udata)); + PUSHs(sv_2mortal(newRV_noinc((SV*)array))); + } + +@@ -152,7 +153,10 @@ get_kev(kq, i) + sv_setiv(AvARRAY(ke2av)[2], ke2[i-1].flags); + sv_setiv(AvARRAY(ke2av)[3], ke2[i-1].fflags); + sv_setiv(AvARRAY(ke2av)[4], ke2[i-1].data); +- av_store(ke2av, 5, SvREFCNT_inc(ke2[i-1].udata)); ++ if (ke2[i-1].udata) ++ av_store(ke2av, 5, SvREFCNT_inc(ke2[i-1].udata)); ++ else ++ av_store(ke2av, 5, &PL_sv_undef); + + RETVAL = newRV_inc((SV*) ke2av); + |