git: 99f25aaa6439 - main - www/mod_perl2: fix build with clang 19 on i386
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 28 Sep 2024 13:33:42 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/ports/commit/?id=99f25aaa64395af55a872fc6cf77127f5f0e4997 commit 99f25aaa64395af55a872fc6cf77127f5f0e4997 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2024-09-19 19:41:23 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2024-09-28 13:29:45 +0000 www/mod_perl2: fix build with clang 19 on i386 Clang 19 has become more strict about incompatible function pointer types, which results in an error building mod_perl2 on i386: modperl_common_util.c:57:53: error: incompatible function pointer types initializing 'int (*)(PerlInterpreter *, SV *, MAGIC *, SV *, const char *, I32)' (aka 'int (*)(struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, long)') with an expression of type 'int (PerlInterpreter *, SV *, MAGIC *, SV *, const char *, int)' (aka 'int (struct interpreter *, struct sv *, struct magic *, struct sv *, const char *, int)') [-Wincompatible-function-pointer-types] 57 | modperl_table_magic_copy}; | ^~~~~~~~~~~~~~~~~~~~~~~~ Perl uses the type `I32` for the last parameter, which is apparently `long` on i386. So use that instead. PR: 281594 MFH: 2024Q3 --- .../files/patch-src_modules_perl_modperl__common__util.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/www/mod_perl2/files/patch-src_modules_perl_modperl__common__util.c b/www/mod_perl2/files/patch-src_modules_perl_modperl__common__util.c new file mode 100644 index 000000000000..f02c783ce1d9 --- /dev/null +++ b/www/mod_perl2/files/patch-src_modules_perl_modperl__common__util.c @@ -0,0 +1,11 @@ +--- src/modules/perl/modperl_common_util.c.orig 2022-01-30 13:02:22 UTC ++++ src/modules/perl/modperl_common_util.c +@@ -41,7 +41,7 @@ int modperl_table_magic_copy(pTHX_ SV *sv, MAGIC *mg, + + MP_INLINE static + int modperl_table_magic_copy(pTHX_ SV *sv, MAGIC *mg, SV *nsv, +- const char *name, int namelen) ++ const char *name, I32 namelen) + { + /* prefetch the value whenever we're iterating over the keys */ + MAGIC *tie_magic = mg_find(nsv, PERL_MAGIC_tiedelem);