From fdb49727a753150890d8d16d26d45fb86fda68bf Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Wed, 18 Mar 2026 15:35:05 -0700 Subject: [PATCH] links,links-x11: Upgrade to 3.20 Fix build with glibc 2.43+ Signed-off-by: Khem Raj --- ...-Adjust-for-c23-prototype-for-strchr.patch | 32 +++++++++++++++++++ .../{links-x11_2.26.bb => links-x11_2.30.bb} | 2 +- meta-oe/recipes-support/links/links.inc | 1 + .../links/{links_2.29.bb => links_2.30.bb} | 2 +- 4 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 meta-oe/recipes-support/links/files/0001-Adjust-for-c23-prototype-for-strchr.patch rename meta-oe/recipes-support/links/{links-x11_2.26.bb => links-x11_2.30.bb} (90%) rename meta-oe/recipes-support/links/{links_2.29.bb => links_2.30.bb} (79%) diff --git a/meta-oe/recipes-support/links/files/0001-Adjust-for-c23-prototype-for-strchr.patch b/meta-oe/recipes-support/links/files/0001-Adjust-for-c23-prototype-for-strchr.patch new file mode 100644 index 0000000000..856bdccdbe --- /dev/null +++ b/meta-oe/recipes-support/links/files/0001-Adjust-for-c23-prototype-for-strchr.patch @@ -0,0 +1,32 @@ +From 75003957e8f526738b479dff7d5d9a5419111f33 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 18 Mar 2026 15:30:37 -0700 +Subject: [PATCH] Adjust for c23 prototype for strchr + +in glibc 2.43+ functions like strchr, memchr, strstr +and friends are now const-preserving macros + +That means if you pass a const char *, strchr now returns const char *, +which breaks older code patterns that assumed char * or wrapped the +result in compatibility helpers + +Upstream-Status: Pending + +Signed-off-by: Khem Raj +--- + ftp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/ftp.c b/ftp.c +index 7a8d05d..41c0a25 100644 +--- a/ftp.c ++++ b/ftp.c +@@ -768,7 +768,7 @@ do { \ + } while (0) + A(ftp_head); + ud = stracpy(get_url_data(c->url)); +- if (strchr(cast_const_char ud, POST_CHAR)) *strchr(cast_const_char ud, POST_CHAR) = 0; ++ if (strchr(ud, POST_CHAR)) *strchr(ud, POST_CHAR) = 0; + s0 = init_str(); + s0l = 0; + add_conv_str(&s0, &s0l, ud, (int)strlen(cast_const_char ud), -1); diff --git a/meta-oe/recipes-support/links/links-x11_2.26.bb b/meta-oe/recipes-support/links/links-x11_2.30.bb similarity index 90% rename from meta-oe/recipes-support/links/links-x11_2.26.bb rename to meta-oe/recipes-support/links/links-x11_2.30.bb index cbee1f10f1..29ea339d02 100644 --- a/meta-oe/recipes-support/links/links-x11_2.26.bb +++ b/meta-oe/recipes-support/links/links-x11_2.30.bb @@ -10,7 +10,7 @@ REQUIRED_DISTRO_FEATURES = "x11" SRC_URI += " file://links2.desktop \ file://links2.png" -SRC_URI[sha256sum] = "f05b3577f25dbe63e491c424f0ecb31f7bfadce9b2bc2f111dfed049c004c9cb" +SRC_URI[sha256sum] = "c4631c6b5a11527cdc3cb7872fc23b7f2b25c2b021d596be410dadb40315f166" S = "${UNPACKDIR}/links-${PV}" diff --git a/meta-oe/recipes-support/links/links.inc b/meta-oe/recipes-support/links/links.inc index a255f0ba6b..5946d8be91 100644 --- a/meta-oe/recipes-support/links/links.inc +++ b/meta-oe/recipes-support/links/links.inc @@ -8,6 +8,7 @@ DEPENDS = "jpeg libpng flex openssl zlib" SRC_URI = "http://links.twibright.com/download/links-${PV}.tar.bz2 \ file://ac-prog-cxx.patch \ + file://0001-Adjust-for-c23-prototype-for-strchr.patch \ " PACKAGECONFIG ??= "" diff --git a/meta-oe/recipes-support/links/links_2.29.bb b/meta-oe/recipes-support/links/links_2.30.bb similarity index 79% rename from meta-oe/recipes-support/links/links_2.29.bb rename to meta-oe/recipes-support/links/links_2.30.bb index e3a15d1819..2a344d11e5 100644 --- a/meta-oe/recipes-support/links/links_2.29.bb +++ b/meta-oe/recipes-support/links/links_2.30.bb @@ -8,4 +8,4 @@ EXTRA_OECONF = "--enable-graphics \ --without-libtiff --without-svgalib --with-fb \ --without-directfb --without-pmshell --without-atheos \ --without-x" -SRC_URI[sha256sum] = "22aa96c0b38e1a6f8f7ed9d7a4167a47fc37246097759ef6059ecf8f9ead7998" +SRC_URI[sha256sum] = "c4631c6b5a11527cdc3cb7872fc23b7f2b25c2b021d596be410dadb40315f166"