CC: | perl5-porters [...] perl.org |
EPoll.xs makes assumptions about the internal representation of POSIX::SigSet objects, accessing
them directly, instead of using any documented API.
We've had to change the internal representation to resolve a bug.
Attached patch allows EPoll.xs to continue to make assumptions about the internal
representation :-)
[Won't actually work as-is until blead's version is bumped to 5.15.3, likely in about a week]
Subject: | IO-EPoll.patch |
--- Epoll.xs~ 2009-01-24 22:03:51.000000000 +0000
+++ Epoll.xs 2011-09-11 13:27:26.000000000 +0100
@@ -78,10 +78,13 @@
if(SvOK(sigmask)) {
if(!sv_derived_from(sigmask, "POSIX::SigSet"))
Perl_croak(aTHX_ "epoll_pwait: sigmask is not of type POSIX::SigSet");
-
+#if PERL_VERSION > 15 || PERL_VERSION == 15 && PERL_SUBVERSION > 2
+ sigmask_real = (sigset_t *) SvPV_nolen(SvRV(sigmask));
+#else
/* This code borrowed from POSIX.xs */
IV tmp = SvIV((SV*)SvRV(sigmask));
sigmask_real = INT2PTR(sigset_t*, tmp);
+#endif
}
else {
sigmask_real = NULL;