Source: inn Version: 1:1.7.2q-47 Severity: important Tags: ftbfs patch User: debian-p...@lists.debian.org Usertags: perl-5.38-transition
This package fails to build from source with Perl 5.38 (currently in experimental). http://perl.debian.net/rebuild-logs/perl-5.38/inn_1.7.2q-47/inn_1.7.2q-47+b1_amd64-2023-06-28T20:00:48Z.build cc -I../include -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -I/usr/lib/x86_64-linux-gnu/perl/5.38/CORE -g -O2 -DTIMER -Wdate-time -D_FORTIFY_SOURCE=2 -c -o icd.o icd.c In file included from innd.h:40, from cc.c:16: ../include/macros.h:86:27: error: expected identifier or ‘(’ before ‘int’ 86 | #define STRLEN(string) ((int)(sizeof string - 1)) | ^~~ /usr/lib/x86_64-linux-gnu/perl/5.38/CORE/perl.h:6088:9: note: in expansion of macro ‘STRLEN’ Looks like there's a naming conflict with STRLEN in <perl.h> and "macros.h". The attached patch / workaround seems to work for me. -- Niko Tyni nt...@debian.org
>From c029b5fd56b9a1b74c3f31d7246739acf3bf6d81 Mon Sep 17 00:00:00 2001 From: Niko Tyni <nt...@debian.org> Date: Tue, 25 Jul 2023 21:01:09 +0100 Subject: [PATCH] Perl 5.38 compatibility perl.h in Perl 5.38 STRLEN usage conflicts with the one in macros.h so we need to include perl.h first --- innd/cc.c | 11 +++++++---- innd/perl.c | 8 ++++++-- nnrpd/perl.c | 8 ++++++-- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/innd/cc.c b/innd/cc.c index 7a2fd39..0a3ab61 100644 --- a/innd/cc.c +++ b/innd/cc.c @@ -12,6 +12,13 @@ #include <stdio.h> #include <sys/types.h> #include "configdata.h" + +#if defined DO_PERL +#include <EXTERN.h> +#include <perl.h> +#include <XSUB.h> +#endif + #include "clibrary.h" #include "innd.h" #include "inndcomm.h" @@ -634,10 +641,6 @@ CCfilter(av) #if defined(DO_PERL) -#include <EXTERN.h> -#include <perl.h> -#include <XSUB.h> - extern CV *perl_filter_cv ; STATIC STRING diff --git a/innd/perl.c b/innd/perl.c index f2b96ce..3ade89a 100644 --- a/innd/perl.c +++ b/innd/perl.c @@ -19,14 +19,18 @@ static void use_rcsid (const char *rid) { /* Never called */ #include <stdio.h> #include <sys/types.h> #include "configdata.h" +#if defined(DO_PERL) + +#include <EXTERN.h> +#include <perl.h> +#endif + #include "clibrary.h" #include "innd.h" #include "art.h" #if defined(DO_PERL) -#include <EXTERN.h> -#include <perl.h> #define my_perl PerlCode extern PerlInterpreter *PerlCode; diff --git a/nnrpd/perl.c b/nnrpd/perl.c index acfd8c1..f75eabf 100644 --- a/nnrpd/perl.c +++ b/nnrpd/perl.c @@ -19,6 +19,12 @@ static void use_rcsid (const char *rid) { /* Never called */ #include <stdio.h> #include <sys/types.h> #include "configdata.h" +#if defined(DO_PERL) + +#include <EXTERN.h> +#include <perl.h> +#endif + #include "clibrary.h" #include "paths.h" #include "post.h" @@ -28,8 +34,6 @@ static void use_rcsid (const char *rid) { /* Never called */ #if defined(DO_PERL) -#include <EXTERN.h> -#include <perl.h> #define my_perl PerlCode extern PerlInterpreter *PerlCode; -- 2.39.1