mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
net-dns/idnkit: Fix incompatible pointers
Part of modern C conversion Bug: https://bugs.gentoo.org/919224 Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com> Closes: https://github.com/gentoo/gentoo/pull/40248 Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
29
net-dns/idnkit/files/idnkit-2.3-incompatible-pointers.patch
Normal file
29
net-dns/idnkit/files/idnkit-2.3-incompatible-pointers.patch
Normal file
@@ -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:
|
||||
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user