diff options
author | David Seifert <soap@gentoo.org> | 2023-05-07 20:35:20 +0200 |
---|---|---|
committer | David Seifert <soap@gentoo.org> | 2023-05-07 20:35:20 +0200 |
commit | e654b5e511fa528838ce055239a7a6f9f704b339 (patch) | |
tree | 156bdfff0d501cee8b55e6dc73238a0732c578e3 /dev-libs | |
parent | www-client/opera-developer: remove old (diff) | |
download | gentoo-e654b5e511fa528838ce055239a7a6f9f704b339.tar.gz gentoo-e654b5e511fa528838ce055239a7a6f9f704b339.tar.bz2 gentoo-e654b5e511fa528838ce055239a7a6f9f704b339.zip |
dev-libs/link-grammar: add upstreamed patch
Closes: https://bugs.gentoo.org/903749
Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch | 35 | ||||
-rw-r--r-- | dev-libs/link-grammar/link-grammar-5.12.3.ebuild | 5 |
2 files changed, 40 insertions, 0 deletions
diff --git a/dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch b/dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch new file mode 100644 index 000000000000..55ca89c09b94 --- /dev/null +++ b/dev-libs/link-grammar/files/link-grammar-5.12.3-Wimplicit-function-declaration.patch @@ -0,0 +1,35 @@ +From 3cbc9ddfd4c3a3e407338619fa383d24da05b23d Mon Sep 17 00:00:00 2001 +From: David Seifert <soap@gentoo.org> +Date: Sun, 7 May 2023 16:02:23 +0200 +Subject: [PATCH] Use correct guard macro for glibc heap functions + +* `__GNUC__` == Compiling with `-std=gnu*` +* `__GLIBC__` == Compiling against glibc + +Bug: https://bugs.gentoo.org/903749 +--- + link-grammar/parse/extract-links.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/link-grammar/parse/extract-links.c b/link-grammar/parse/extract-links.c +index a6129ac7a..e2ce266bc 100644 +--- a/link-grammar/parse/extract-links.c ++++ b/link-grammar/parse/extract-links.c +@@ -278,7 +278,7 @@ void free_extractor(extractor_t * pex) + pex->x_table_size = 0; + pex->x_table = NULL; + +-#if defined __GNUC__ ++#if defined __GLIBC__ + // MST parsing can result in pathological cases, with almost a + // billion elts in the Parse_choice_pool. This blows up the + // resident-set size (RSS) over time. Avoid this issue by trimming. +@@ -294,7 +294,7 @@ void free_extractor(extractor_t * pex) + + xfree((void *) pex, sizeof(extractor_t)); + +-#if defined __GNUC__ ++#if defined __GLIBC__ + // malloc_trim() is a gnu extension. An alternative would be + // to call madvise(MADV_DONTNEED) but this is more complicated. + if (trim) malloc_trim(0); diff --git a/dev-libs/link-grammar/link-grammar-5.12.3.ebuild b/dev-libs/link-grammar/link-grammar-5.12.3.ebuild index 8aa2ad28347d..ad2d6ce3d75f 100644 --- a/dev-libs/link-grammar/link-grammar-5.12.3.ebuild +++ b/dev-libs/link-grammar/link-grammar-5.12.3.ebuild @@ -31,6 +31,11 @@ BDEPEND=" sys-devel/autoconf-archive virtual/pkgconfig" +PATCHES=( + # upstreamed (https://github.com/opencog/link-grammar/pull/1471) + "${FILESDIR}"/${P}-Wimplicit-function-declaration.patch +) + pkg_setup() { if use aspell && use hunspell; then ewarn "You have enabled 'aspell' and 'hunspell' support, but both cannot coexist," |