tag 466734 patch
thanks
On Wed, Feb 20, 2008 at 06:44:00PM +0200, Niko Tyni wrote:
> Package: libapache-db-perl
> Version: 0.10-1
> Severity: important
> User: [EMAIL PROTECTED]
> Usertags: perl-5.10-transition
>
> Your package fails to build with Perl 5.10 (currently in experimental.)
>
> >From the build log:
>
> /usr/bin/perl /usr/share/perl/5.10/ExtUtils/xsubpp -typemap
> /usr/share/perl/5.10/ExtUtils/typemap DB.xs > DB.xsc && mv DB.xsc DB.c
> cc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fno-strict-aliasing -pipe
> -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall
> -DVERSION=\"0.10\" -DXS_VERSION=\"0.10\" -fPIC "-I/usr/lib/perl/5.10/CORE"
> DB.c
> DB.xs: In function 'XS_DB_ApacheSIGINT':
> DB.xs:59: error: too few arguments to function 'ApacheSIGINT'
> DB.c:80: warning: unused variable 'items'
> make[1]: *** [DB.o] Error 1
> make[1]: Leaving directory `/build/niko/libapache-db-perl-0.10'
> make: *** [build-stamp] Error 2
Here's a patch that looks at the perl version to determine the right way
to call a signal handler. I can't see any better way to do this. The
prototype was changed upstream when the version was already bumped to
5.10.0, so no 5.9.x versions should be affected.
This works for me on both 5.8.8 and 5.10.0.
Cheers,
--
Niko Tyni [EMAIL PROTECTED]
diff --git a/DB.xs b/DB.xs
index 151b1ca..6e2f128 100644
--- a/DB.xs
+++ b/DB.xs
@@ -56,4 +56,8 @@ void
ApacheSIGINT(...)
CODE:
+#if ((PERL_REVISION == 5) && (PERL_VERSION >= 10))
+ if (ApacheSIGINT) (*ApacheSIGINT)(SIGINT, NULL, NULL);
+#else
if (ApacheSIGINT) (*ApacheSIGINT)(SIGINT);
+#endif