dev-perl/Digest-Nilsimsa: fix build w/ clang 16

Closes: https://bugs.gentoo.org/870895
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Sam James
2023-01-21 04:06:23 +00:00
parent 5b86df4fdf
commit b629893208
2 changed files with 24 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 1999-2021 Gentoo Authors
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -15,6 +15,10 @@ LICENSE="GPL-2+ LGPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 ~hppa ~ia64 ppc ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos"
PATCHES=(
"${FILESDIR}"/${PN}-0.60.0-clang16.patch
)
src_compile() {
mymake=(
"OPTIMIZE=${CFLAGS}"

View File

@@ -0,0 +1,19 @@
https://bugs.gentoo.org/870895
https://rt.cpan.org/Public/Bug/Display.html?id=145874
Add missing function prototypes. This avoids implicit function
declarations when building Nilsimsa.xs and build failures with future
compilers.
--- a/nilsimsa.h
+++ b/nilsimsa.h
@@ -47,6 +47,8 @@ int nilsimsa(struct nsrecord *a,struct nsrecord *b);
void aggregate(int n);
void codetostr(struct nsrecord *a,char *str);
int strtocode(char *str,struct nsrecord *a);
+void makecode(struct nsrecord *a);
+void clear(struct nsrecord *a);
int accbuf(unsigned char *buf,int len,struct nsrecord *a);
void dprint(char *msg);