diff --git a/net-dns/idnkit/files/idnkit-2.3-incompatible-pointers.patch b/net-dns/idnkit/files/idnkit-2.3-incompatible-pointers.patch new file mode 100644 index 0000000000000..130d18b2307f6 --- /dev/null +++ b/net-dns/idnkit/files/idnkit-2.3-incompatible-pointers.patch @@ -0,0 +1,29 @@ +Fix incompatible pointers for modern C, hope that restrict qualifier +holds in this scenario +https://bugs.gentoo.org/919224 +--- a/lib/localconverter.c ++++ b/lib/localconverter.c +@@ -599,12 +599,12 @@ + inleft = 0; + outbuf = NULL; + outleft = 0; +- iconv(ictx, (const char **)NULL, &inleft, &outbuf, &outleft); ++ iconv(ictx, NULL, &inleft, &outbuf, &outleft); + + inleft = strlen(from); + inbuf = from; + outleft = tolen - 1; /* reserve space for terminating NUL */ +- sz = iconv(ictx, (const char **)&inbuf, &inleft, &to, &outleft); ++ sz = iconv(ictx, (char ** restrict)&inbuf, &inleft, &to, &outleft); + + if (sz == (size_t)(-1) || inleft > 0) { + switch (errno) { +@@ -630,7 +630,7 @@ + * Append a sequence of state reset. + */ + inleft = 0; +- sz = iconv(ictx, (const char **)NULL, &inleft, &to, &outleft); ++ sz = iconv(ictx, NULL, &inleft, &to, &outleft); + if (sz == (size_t)(-1)) { + switch (errno) { + case EILSEQ: diff --git a/net-dns/idnkit/idnkit-2.3-r1.ebuild b/net-dns/idnkit/idnkit-2.3-r2.ebuild similarity index 84% rename from net-dns/idnkit/idnkit-2.3-r1.ebuild rename to net-dns/idnkit/idnkit-2.3-r2.ebuild index 67dd9b43e2e04..3a20fa937d687 100644 --- a/net-dns/idnkit/idnkit-2.3-r1.ebuild +++ b/net-dns/idnkit/idnkit-2.3-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2024 Gentoo Authors +# Copyright 1999-2025 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -19,6 +19,8 @@ DEPEND=" dev-lang/perl " +PATCHES=( "${FILESDIR}"/"${P}"-incompatible-pointers.patch ) + src_configure() { econf $(use_enable liteonly) }