aboutsummaryrefslogtreecommitdiff
path: root/devel/p5-IO-KQueue/files
diff options
context:
space:
mode:
authorJun Kuriyama <kuriyama@FreeBSD.org>2009-10-04 15:28:36 +0000
committerJun Kuriyama <kuriyama@FreeBSD.org>2009-10-04 15:28:36 +0000
commit8b9c4d41cd073d728b435d9f2e4425f177e8171d (patch)
treef7b9dbd7916adf64a10be2179bc46cac2c2c1d8d /devel/p5-IO-KQueue/files
parente2f269c879dac2664eb00061e33139858500e0f4 (diff)
downloadports-8b9c4d41cd073d728b435d9f2e4425f177e8171d.tar.gz
ports-8b9c4d41cd073d728b435d9f2e4425f177e8171d.zip
Notes
Diffstat (limited to 'devel/p5-IO-KQueue/files')
-rw-r--r--devel/p5-IO-KQueue/files/patch-KQueue.xs24
1 files changed, 24 insertions, 0 deletions
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);
+