Skip to content

Commit

Permalink
dev-perl/Digest-Nilsimsa: fix build w/ clang 16
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/870895
Signed-off-by: Sam James <[email protected]>
  • Loading branch information
thesamesam committed Jan 21, 2023
1 parent 5b86df4 commit b629893
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}"
Expand Down
Original file line number Diff line number Diff line change
@@ -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);

0 comments on commit b629893

Please sign in to comment.