From patchwork Mon Mar 30 15:16:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 84850 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FB221061B10 for ; Mon, 30 Mar 2026 15:16:32 +0000 (UTC) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.54087.1774883788145609192 for ; Mon, 30 Mar 2026 08:16:28 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=Ju5a4+gn; spf=pass (domain: gmail.com, ip: 209.85.221.48, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-439d8df7620so3301329f8f.0 for ; Mon, 30 Mar 2026 08:16:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774883786; x=1775488586; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=c7Ntv5WlGXlL27P/RsBAxjbVszcLFVitE0WPg10Pytc=; b=Ju5a4+gnOf22I4cusOmgaUMBUiV6KvU5IEFdz3PP2eaMMdanMf5sY35vnJMDw/gXaa 5PJSVR++i+ML5kticxMXU8gKkuhCYjxOYJ1bElmfNIHJ/y7IP4O56p5DBx1FI3VoDd8o 0AAK7xY8ulNBF1xkHls8CXGS0ouZF4m+fG0g9ODUCwvqcqfVUPSiUn7D4/imseLTWNZi CmzRxFoGK4sr0dfSeLi7gwCiaZTmokvF/zm4mSg14S7WZVyvMH4HxG5RrzekxbZtR3TA Inixw1bG5aOY93sR3l8aeXdfsQQV+cVpPcvCj43UDza5QnOVTMJeycHS7V+gjpw54qAG NE7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774883786; x=1775488586; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=c7Ntv5WlGXlL27P/RsBAxjbVszcLFVitE0WPg10Pytc=; b=Jo9KMq+8hHOvFxRIQDLyn4OKnz5Z3MSwxeFVPuR3cDBnUp/5LpN/gnW459k/U8PE0l dR43jRNuPbAnc2KXhHu2bMYch3lvOA42MeDMUpqlpuqn1nw07U8aZVX64bTzUSFxhKoT cqoJrXJxMapTM5N1KK6eY7lfCow5v+KI8LTO0dPAuqJ5jc95fJjOGmQU+CkbfUlZH0dM nobKJzo/uGOZYl2l3+q13+bfTL+r7F576AwLzsHynVN4RpE3snDpoR+wNskldbp916O1 3dkyoUznTZNj9BIuIRGvWZcfIr2+nUPKL+WBTO6O7U8uSugvcT7AjKfAcshUX7GxQJN2 N5Xw== X-Gm-Message-State: AOJu0Yxozn0BkHIzuCmqQVcfEkQ23aBmPHzEN8YMPMZT/CZ3jWRS91GI JGiicWX3IR96VF+yBHytLxap7+fAYJ3P7K92orS4/9j73EnN8kaK2w93LRd/Vw== X-Gm-Gg: ATEYQzz6A4fXjISQQVY6o05MKV2ZwEFzUgbxS5Rpw7pS+bP81HkhadVLv34v2AWp1p9 clqyEYpVcyBOZfa10fAruoOkc6eK8be5Hf+WzNCLp5bMRKbV2X6DZzNonBaDIIOg5dXNhgqEveg LHvNK4ufUyDmntk+anvEBA/Gg/RJ0uHePwj1TIiFPxiIK6HlF5j3PiKXA4uL4odOgpuLO3HAFPE 0g21noZpse8LeofL8FHy4w278UfALGSyaalwTePEIPH1DLRxw1n3px2XgWI5GLWqkhho28IPfdL BdfpssXqe9S+2ZxEQZgPc2y1P6CZ6H8mUQlOtTb/fB1Qhs3879hqWoDSOuC3VwgpSKbTIC2NDOL km9yxD4aiiTxiIz5cifK14Hu0gGTrrGds3w/W7MVPSt1G1MiUWHBHfVIN7sdSlU+zHodgQqLqW5 wCsGu0Dq7RoCV0ebwbi7AqJkGk2Q== X-Received: by 2002:a05:600c:a108:b0:485:17a7:b9c7 with SMTP id 5b1f17b1804b1-48727d6f6d8mr176843645e9.10.1774883786190; Mon, 30 Mar 2026 08:16:26 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48722d49c18sm282326195e9.14.2026.03.30.08.16.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 08:16:25 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa , Mathieu Dubois-Briand , Richard Purdie Subject: [whinlatter][PATCH 1/7] dtc: backport fix for build with glibc-2.43 Date: Mon, 30 Mar 2026 17:16:10 +0200 Message-ID: <20260330151620.3835312-1-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 30 Mar 2026 15:16:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234242 From: Martin Jansa glibc-2.43 isn't used in OE builds yet, but this fixes dtc-native: https://errors.yoctoproject.org/Errors/Details/903983/ ../sources/dtc-1.7.2/libfdt/fdt_overlay.c: In function ‘overlay_fixup_phandle’: ../sources/dtc-1.7.2/libfdt/fdt_overlay.c:424:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 424 | sep = memchr(fixup_str, ':', fixup_len); | ^ ../sources/dtc-1.7.2/libfdt/fdt_overlay.c:434:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 434 | sep = memchr(name, ':', fixup_len); | ^ cc1: all warnings being treated as errors Signed-off-by: Martin Jansa Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- .../0001-Fix-discarded-const-qualifiers.patch | 83 +++++++++++++++++++ meta/recipes-kernel/dtc/dtc_1.7.2.bb | 1 + 2 files changed, 84 insertions(+) create mode 100644 meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch diff --git a/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch b/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch new file mode 100644 index 0000000000..053a94f0bf --- /dev/null +++ b/meta/recipes-kernel/dtc/dtc/0001-Fix-discarded-const-qualifiers.patch @@ -0,0 +1,83 @@ +From c58beee7bec0774f12202511c97beb741ff2b534 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Tue, 6 Jan 2026 14:19:30 -0500 +Subject: [PATCH] Fix discarded const qualifiers + +It's unsafe to implicitly discard the const qualifier on a pointer. In +overlay_fixup_phandle(), this was probably just an oversight, and making +the "sep" variable a const char * is sufficient to fix it. + +In create_node(), however, the "p" variable is directly modifying the +buffer pointed to by "const char* node_name". To fix this, we need to +actually make a duplicate of the buffer and operate on that instead. + +This introduces a malloc()/free() and an unbounded strdup() into the +operation, but fdtput isn't a long-running service and the node_name +argument comes directly from argv, so this shouldn't introduce a +significant performance impact. + +Signed-off-by: Stephen Gallagher +Signed-off-by: David Gibson +Signed-off-by: Martin Jansa +Upstream-Status: Backport [https://git.kernel.org/pub/scm/utils/dtc/dtc.git/commit/libfdt/fdt_overlay.c?h=main&id=9a1c801a1a3c102bf95c5339c9e985b26b823a21] +--- + fdtput.c | 8 +++++--- + libfdt/fdt_overlay.c | 3 ++- + meson.build | 1 + + 3 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/fdtput.c b/fdtput.c +index c2fecf4..8deec7e 100644 +--- a/fdtput.c ++++ b/fdtput.c +@@ -230,19 +230,21 @@ static int create_paths(char **blob, const char *in_path) + static int create_node(char **blob, const char *node_name) + { + int node = 0; +- char *p; ++ const char *p; ++ char *path = NULL; + + p = strrchr(node_name, '/'); + if (!p) { + report_error(node_name, -1, -FDT_ERR_BADPATH); + return -1; + } +- *p = '\0'; + + *blob = realloc_node(*blob, p + 1); + + if (p > node_name) { +- node = fdt_path_offset(*blob, node_name); ++ path = xstrndup(node_name, (size_t)(p - node_name)); ++ node = fdt_path_offset(*blob, path); ++ free(path); + if (node < 0) { + report_error(node_name, -1, node); + return -1; +diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c +index 28b667f..5f8aa62 100644 +--- a/libfdt/fdt_overlay.c ++++ b/libfdt/fdt_overlay.c +@@ -409,7 +409,8 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int symbols_off, + const char *fixup_str = value; + uint32_t path_len, name_len; + uint32_t fixup_len; +- char *sep, *endptr; ++ const char *sep; ++ char *endptr; + int poffset, ret; + + fixup_end = memchr(value, '\0', len); +diff --git a/meson.build b/meson.build +index 310699f..2966b06 100644 +--- a/meson.build ++++ b/meson.build +@@ -18,6 +18,7 @@ add_project_arguments( + '-Wshadow', + '-Wsuggest-attribute=format', + '-Wwrite-strings', ++ '-Wdiscarded-qualifiers', + ]), + language: 'c' + ) diff --git a/meta/recipes-kernel/dtc/dtc_1.7.2.bb b/meta/recipes-kernel/dtc/dtc_1.7.2.bb index 92e83a9404..b8b79542c5 100644 --- a/meta/recipes-kernel/dtc/dtc_1.7.2.bb +++ b/meta/recipes-kernel/dtc/dtc_1.7.2.bb @@ -10,6 +10,7 @@ LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ SRC_URI = " \ git://git.kernel.org/pub/scm/utils/dtc/dtc.git;branch=main;protocol=https \ + file://0001-Fix-discarded-const-qualifiers.patch \ " SRCREV = "2d10aa2afe35527728db30b35ec491ecb6959e5c" From patchwork Mon Mar 30 15:16:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 84849 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 04B9B1061B0B for ; Mon, 30 Mar 2026 15:16:32 +0000 (UTC) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.53841.1774883789212702603 for ; Mon, 30 Mar 2026 08:16:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=sMnFaz04; spf=pass (domain: gmail.com, ip: 209.85.221.47, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-43cff5dafc3so914584f8f.1 for ; Mon, 30 Mar 2026 08:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774883788; x=1775488588; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=qaF2ZqA6ejmwYl6nT7hja/uhPwl649Cfq1F7Lh+q6no=; b=sMnFaz04y7ZBHwwB6OzDtd8QECACwxWMHzWtIg/LdJdzbMuSI3CdZMcETFCuR56Z8L 44LtCsrc9k8mBk9spG1+u+nivMbzByOsbqbwozpeaBshqhiP7qQ1ZwI3/yNZ3WsSs05x OJOd0SEOINobRzC3jIloXlCM6PPwsGSe6Fe6b9o0x971t2cmIa0NaBYhEzTLDrJxelBO n2zwNsrPk8XVEA3ZEaZkHTJznG0gVHU/COpyNQfU31KGmmYZoBUPE66RMaXwEROkCTpk /aiPf2OOoCp7Rvsib7P0tuZ4BfDVrxOksV1tahadkTDwdEmaGhDAhm4J9h7ofrTOVexq mjJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774883788; x=1775488588; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=qaF2ZqA6ejmwYl6nT7hja/uhPwl649Cfq1F7Lh+q6no=; b=OH7eJMnp5Rc11oOv5MDtHyNkSWYJ22kAhUv3v/yr9QuPtzlKz6RAWAYJavvB+N+Yww isVx3LHNCcLXirVaOSh/+pcmEXplN0N1FYqCrcztjhaj5dg6/OsfE5VbWpg5mCIKnHhM sH0coKK5NBc1hrFkYBwypSgPLV1SVxOBzj15FvoM4/akGhbbFrsx3VjqAkQxwyifNf7b ofUMomCux17Mz+XmUWjDqb5bgiPPdKhhIN8hcVT9eb+aIj3APdL4FC/ZlP4O+tnYtUfS Y/6ruBqQJZY9VzpR88KYyuQjzOwVHzkayvOoi9oYmjqfXS9TZmFwsdVKgliBjPfMXbb3 FUcw== X-Gm-Message-State: AOJu0YxfKt4WhysRE2ReuLFrnYmMJNbL42G1MF/Muo/bAfO0OSt7RRGr DrF7rbvwwuDgz73S86UBQDIAPsqQ2dD6dXqQfrv2vCLZP9V7xN1LsBuxYOkt2g== X-Gm-Gg: ATEYQzyl2jgNDpUJdofoQ88rMX0IiYDcSy9XCLWLMvj1D2+y2VRaKOZkQdPel3E/3VP 5VhfAX3+ACk13tuwrK34iTfqCYejFfQwYHrnnHihpKl5vgX13ZZvlWKzD0ftJ1ldcDFuh7cVK9F gD9Y9bTJUQP1bSCEldSHzDgr4KxiRPaAp23Wkn/Is74AM8ATeyvxfIjT12mxgwQTaVD+cncfbCx NvBTbsjlOERuFwZoKJm8QDH1k/yk1nkqssUG5MAG1+ap1kaEMlp8QPeeuvmUgXoUnOq/r80yHVq kZc6wuoc4wlufLPXcmnm70lUwAOsck13TBoXcq/0/4cmjlwWUO9KV8YKbXyr7KBG8MKOtZfuYeS 3wzR+dvm97g7uIALPdj/Rn6wEJqvJ7agDDuwf/G4LfS4qmGiDkyXjYXOs+UT3ssnasJvZa8wIEK hzG6lx3onX4/K6pIicvAk8kR8p7A== X-Received: by 2002:a05:6000:2f85:b0:43c:f66e:f2d with SMTP id ffacd0b85a97d-43cf66e113cmr13187380f8f.27.1774883787107; Mon, 30 Mar 2026 08:16:27 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43cf21e2727sm21660997f8f.2.2026.03.30.08.16.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 08:16:26 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Richard Purdie Subject: [whinlatter][PATCH 2/7] pseudo: Add fix for glibc 2.43 Date: Mon, 30 Mar 2026 17:16:11 +0200 Message-ID: <20260330151620.3835312-2-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330151620.3835312-1-martin.jansa@gmail.com> References: <20260330151620.3835312-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 30 Mar 2026 15:16:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234243 From: Richard Purdie Update to add a fix for a function definition to work with glibc 2.43. Signed-off-by: Richard Purdie --- meta/recipes-devtools/pseudo/pseudo_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb index a26a205a16..4d31629903 100644 --- a/meta/recipes-devtools/pseudo/pseudo_git.bb +++ b/meta/recipes-devtools/pseudo/pseudo_git.bb @@ -12,7 +12,7 @@ SRC_URI:append:class-nativesdk = " \ file://older-glibc-symbols.patch" SRC_URI[prebuilt.sha256sum] = "ed9f456856e9d86359f169f46a70ad7be4190d6040282b84c8d97b99072485aa" -SRCREV = "43cbd8fb4914328094ccdb4bb827d74b1bac2046" +SRCREV = "56e1f8df4761da60e41812fc32b1de797d1765e9" PV = "1.9.3+git" # largefile and 64bit time_t support adds these macros via compiler flags globally From patchwork Mon Mar 30 15:16:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 84847 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FE3B1061B0E for ; Mon, 30 Mar 2026 15:16:32 +0000 (UTC) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.53843.1774883789904446791 for ; Mon, 30 Mar 2026 08:16:30 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=TTv0RZG8; spf=pass (domain: gmail.com, ip: 209.85.221.48, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-43ccda008cdso1481120f8f.0 for ; Mon, 30 Mar 2026 08:16:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774883788; x=1775488588; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6xYx6+4w7jX3M6Aoup4NUI8Mc3h5JJeX9em16Jcc7Fk=; b=TTv0RZG8EuW3PT6ymSuwgufL3MWFEU0RWocUi2Vz4lhqLMaBl4egDlRc4aIL1WnuBP yJYVsaKBXtQbomFLC+vsSQABPnz6lewqAlPsr9SFmTHoHntbRQQom1h2KQIgxY78FPkw ivgQldD4NxV94iuFpPXPXWeY5B4GArPqWc1rWjMUxHP3LPed0BKfSMsoBsFQMtIqSfKc LtU+BMn3QgHMPvMwSGK7JlWu3FZofne/NlxgCBgVIXnpQ1CHMOMO/3eMjg0TakcmDgES wgcPslDyjjvb+s5D+Fgv2rO88NnE5wzJgt3oXZzLL5rPEa0+NFkWRVkmI2HpdTc1rzIQ znJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774883788; x=1775488588; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=6xYx6+4w7jX3M6Aoup4NUI8Mc3h5JJeX9em16Jcc7Fk=; b=e6hSEyeCJYJz+qC9YH1/X4OHCi+aPyUQCf7eHqYcznQsW+0qLSNZFtr66WqNDpKa1r iMHCOJ4RSnmYHOzWiDmtlx42Uq22wHxgglUiBBd+VDmKJlsd0/BRuKmx//4nQ6GP17vf PTBEmr9xANYovsH1pAUgFSJUOjewfdye6Lw4uJzY8MfeIOkAAtayD9VbSNCiL7R72P4w q/iQT6x0/hjYYh6UtFWH5k3Iem4JjSK73DE96tQZe7BH3rU0b8wOSSKNG8GwKHNyWodD Ed083CSPSvz4rXkjEYGz8RcCEz+9imNL6dMWJXG8poNfkacB4XkWqkgQwprJ4rtvN4RV 3CAQ== X-Gm-Message-State: AOJu0Yw2RjelSbW0fWiwf8KAm8Q/Hkc1Am9WetxjBwIQ6T1nj3r+Zpn9 ChGtXh9bBxMjlRzsbeiIiJ+mlNVRH0W5Mvp10Sn62gAogB3xKZPWQqTdPCs4sg== X-Gm-Gg: ATEYQzz6tyvX3owYngXtQicS/GWdXlrrw7QS/1KyzobrPTBh2/5lgquIlX/P3Fvfh2C o3Rp23fWUgAXM44P9YOekiAWh31KylAXppdzlnFdeWAGA9GvNLctxUusug738uSY+uK8bB7NeEq zJm1Ni8GEvD8l3Zk5KBTckgrpeopXaBSzv4YhXQpXaEE9acVi/9UQcR9wFu4k9bmDkZrxlDeY6Z YhflzN2tCMEQ11K43o/7zDnr9TlD/nUAqrSYPCLoA8SmBrbL7m/rdAcDAERr1SmjwLaNcZzM/+g GIkgFDVjEcc4QYvtu76TU8cT9Zm1FE1b8L7bC1ikM03HppEggO34rOpEQmQdC4YtknfFg8bC7gK 8M+r8PvgQwt8WpM2W5d0aVLv+8Xrut0EGPExezbRtISXyK+hshJklBVMGHssfOMPjiE9lcut0Eo xDumvZtgE7iaC2WoDFzCS5eW6ebw== X-Received: by 2002:a5d:5887:0:b0:43b:8e96:d3d2 with SMTP id ffacd0b85a97d-43b97a253f2mr27354970f8f.13.1774883788100; Mon, 30 Mar 2026 08:16:28 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43cf21ebef9sm20631473f8f.13.2026.03.30.08.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 08:16:27 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Michael Halstead , Richard Purdie Subject: [whinlatter][PATCH 3/7] yocto-uninative: Update to 5.1 for glibc 2.43 Date: Mon, 30 Mar 2026 17:16:12 +0200 Message-ID: <20260330151620.3835312-3-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330151620.3835312-1-martin.jansa@gmail.com> References: <20260330151620.3835312-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 30 Mar 2026 15:16:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234244 From: Michael Halstead yocto-uninative: Update to 5.1 for glibc 2.43 Signed-off-by: Michael Halstead Signed-off-by: Richard Purdie --- meta/conf/distro/include/yocto-uninative.inc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/conf/distro/include/yocto-uninative.inc b/meta/conf/distro/include/yocto-uninative.inc index e9dc6c8640..d97c96f631 100644 --- a/meta/conf/distro/include/yocto-uninative.inc +++ b/meta/conf/distro/include/yocto-uninative.inc @@ -6,10 +6,10 @@ # to the distro running on the build machine. # -UNINATIVE_MAXGLIBCVERSION = "2.42" -UNINATIVE_VERSION = "5.0" +UNINATIVE_MAXGLIBCVERSION = "2.43" +UNINATIVE_VERSION = "5.1" UNINATIVE_URL ?= "http://downloads.yoctoproject.org/releases/uninative/${UNINATIVE_VERSION}/" -UNINATIVE_CHECKSUM[aarch64] ?= "a25f2174d0cefcb22af005e9bc72ac01ae83b011c5b6d6d5bf00dac979877f76" -UNINATIVE_CHECKSUM[i686] ?= "959cc2539b692f9b9862825c7324a0fe4d061fca742f6c259f67f581c59af956" -UNINATIVE_CHECKSUM[x86_64] ?= "96045e8b1e242c8a849426a8506c7043f354b39f2bc0035192780e8205e23e9d" +UNINATIVE_CHECKSUM[aarch64] ?= "4166237a9dabd222dcb9627a9435dffd756764fabf76ed7ef2e93dc2964567ad" +UNINATIVE_CHECKSUM[i686] ?= "761502cc9aef4d54d0c6fe9418beb9fdd2c6220da6f2b04128c89f47902ab9ae" +UNINATIVE_CHECKSUM[x86_64] ?= "2b63a078c26535e0786e87f81ae69509df30f4dce40693004c527bd5e4ab2b85" From patchwork Mon Mar 30 15:16:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 84848 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 144731061B0F for ; Mon, 30 Mar 2026 15:16:32 +0000 (UTC) Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.53844.1774883790895350967 for ; Mon, 30 Mar 2026 08:16:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=YlPWtgqg; spf=pass (domain: gmail.com, ip: 209.85.128.53, mailfrom: martin.jansa@gmail.com) Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-48700b1ba53so41132795e9.1 for ; Mon, 30 Mar 2026 08:16:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774883789; x=1775488589; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QkL9xH03GlikxwZgze5ClhyfcW/n4K1mcmR4z7ebM6A=; b=YlPWtgqgPgyclWiVQq1XmiMPdwgSgRfSRLcBG90kOEMQ19Gyigdxa+bnXeBy2ecIh0 JQASI8+TrUa/91oTMziSrnzcr1W806oETDfiCsSnbBn+FuW37wTTLgUhDhxjXQjItEnK 8m9PWqdTrYmPFZl8wBd9Ugnvj5gApjRiMAI33hrCd/CUDL+BEW+7SCVEHHtCnfgVT0qa 0/5MTTW3Ydcgnlg2561F3W0FwBG076NcdpfHvGEZ5ERtu+PIV1rV+yI8BHGmUY2t34dK 2xIoVLwTLZ6DuUbbD4C0+UfJeklpgrkSGlK+JaeYr4ne/bLxzSUQ4Srfpn8tCCH4FWrY lkjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774883789; x=1775488589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QkL9xH03GlikxwZgze5ClhyfcW/n4K1mcmR4z7ebM6A=; b=kMCpw/mxRoKwHOLlR1EVRWxj/AxaTA0bOVLDgHWpjyX+bl6Wq6qgQVehhViTHpN4o8 YdbAU2CBrCITLnOmxpLskzQUHIhXIkfW1MiDBYKFR7NMCQLlJbHNM6rsNxZ7oY3xr2zb ksulCR5PHfB3FgIF+aVeyDJn/aEE5BVI1REk47Y0guKnAKM8GCJa1cjRy4HHLa7WUAbO jbyzYAB5n9OAnxZrY1rqghCYsepg7IpzAYARDGpWzj83uWwQMB0Y6oYdwXr4zvlhI8H9 z5SSutSnvwqy9gq3NBHhOTjZ/IJHgKFusvxl+yCLEs0AlDHA1zfzVTWHnrlN1+nD9Uwf /TMQ== X-Gm-Message-State: AOJu0Yy9OXsAp4uzXZqeyPnrl9TuYEuFF59HS9YwYCmW2PckBby0w6NF EiNV/joNOMSXkCntum3kXaWCbrjQMJazGy0/4qSXhsbP6dBW8iMgQ7WiFhkBKQ== X-Gm-Gg: ATEYQzw48z3W2XQBa/4i3nrdyaY2KA0+2xcPJbZzxaO8PZ7hb964WQ5SapQk5FX9/f+ 5JdtM1dgWRcsz3ysBlSl96DT+yohi/R/5qWobGJAmsSNaXk0jGyuidrptLrl3Qcyi9XXGWVCysk Mmgviwc9GZqnqT++4zMARjnlexMz7vMm1kRx+fySqtlsdYmSoJPG5ZMObCza+zhjUPpM2KVlJkw 9jocnNov8kgKj7nBa04MI5NGK5I8EVFV5FbhRaseAR1O7bPftBCl1Ssyq0zggobkjHNWmzFXza0 ZXp+dre8OaYc6++NANHfisXRFt0526YaKNSY55VD/yTwyHfNfU+XdDcDKjhuMLnVSQKWIviKDuQ hSYrRw/l5kHPXz9xTfubpSWSgMDd13OWdZZOjhGS9TZicitguEAAAL2rIguF3luga61vbDmTXnR r4oNok+TNy5R5AkW4VeuERAm+27A== X-Received: by 2002:a05:600c:4e0e:b0:485:2a85:e5ec with SMTP id 5b1f17b1804b1-48727ef5508mr212587625e9.2.1774883788999; Mon, 30 Mar 2026 08:16:28 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48733c095dbsm120431825e9.0.2026.03.30.08.16.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 08:16:28 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa Subject: [whinlatter][PATCH 4/7] m4: backport 3 gnulib changes to fix build with glibc-2.43 on host Date: Mon, 30 Mar 2026 17:16:13 +0200 Message-ID: <20260330151620.3835312-4-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330151620.3835312-1-martin.jansa@gmail.com> References: <20260330151620.3835312-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 30 Mar 2026 15:16:32 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234245 From: Martin Jansa All 3 are already included in m4-1.4.21 used in master. Signed-off-by: Martin Jansa --- meta/recipes-devtools/m4/m4-1.4.20.inc | 3 + ...-Fix-some-g-Wsystem-headers-warnings.patch | 135 ++++++++++++ ...pilation-error-on-macOS-with-fortify.patch | 126 ++++++++++++ ...23-qualifier-generic-fns-like-strchr.patch | 194 ++++++++++++++++++ 4 files changed, 458 insertions(+) create mode 100644 meta/recipes-devtools/m4/m4/0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch create mode 100644 meta/recipes-devtools/m4/m4/0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch create mode 100644 meta/recipes-devtools/m4/m4/0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch diff --git a/meta/recipes-devtools/m4/m4-1.4.20.inc b/meta/recipes-devtools/m4/m4-1.4.20.inc index 5c4ba09288..df47e1e188 100644 --- a/meta/recipes-devtools/m4/m4-1.4.20.inc +++ b/meta/recipes-devtools/m4/m4-1.4.20.inc @@ -8,6 +8,9 @@ inherit autotools texinfo ptest gettext SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ file://0001-gettext-h-Avoid-gcc-Wformat-security-warnings-with-d.patch \ + file://0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch \ + file://0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch \ + file://0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch \ " SRC_URI:append:class-target = " file://run-ptest \ file://0001-test-c32ispunct-Check-for-musl-along-with-glibc.patch \ diff --git a/meta/recipes-devtools/m4/m4/0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch b/meta/recipes-devtools/m4/m4/0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch new file mode 100644 index 0000000000..63495a8443 --- /dev/null +++ b/meta/recipes-devtools/m4/m4/0001-string-h-wchar-h-Fix-some-g-Wsystem-headers-warnings.patch @@ -0,0 +1,135 @@ +From a9ff1a1ea55bee12751c751460a0102493fa65aa Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Mon, 12 May 2025 03:05:51 +0200 +Subject: [PATCH] string-h, wchar-h: Fix some g++ -Wsystem-headers warnings. + +* lib/string.in.h (memcpy, memccpy, memmove, strncpy, strndup, strncat, +memcmp, strncmp, memset): On glibc systems, declare with +_GL_ATTRIBUTE_NOTHROW. +* lib/wchar.in.h (wmemcpy, wmemmove, wcsncpy, wcsncat, wmemcmp, wcsncmp, +wmemset): Likewise. + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=0614c2db34f65c595d85be4adc5628778905855a] +Signed-off-by: Martin Jansa +--- + lib/string.in.h | 27 +++++++++++++++++++++++++++ + lib/wchar.in.h | 21 +++++++++++++++++++++ + 2 files changed, 48 insertions(+) + +diff --git a/lib/string.in.h b/lib/string.in.h +index e764221..e3d94b7 100644 +--- a/lib/string.in.h ++++ b/lib/string.in.h +@@ -215,25 +215,49 @@ _GL_EXTERN_C void free (void *); + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ + _GL_EXTERN_C void *memcpy (void *__dest, const void *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C void *memccpy (void *__dest, const void *__src, int __c, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 4) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 4); + _GL_EXTERN_C void *memmove (void *__dest, const void *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C char *strncpy (char *__dest, const char *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C char *strndup (const char *__s, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2); + _GL_EXTERN_C char *strncat (char *__dest, const char *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C int memcmp (const void *__s1, const void *__s2, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C int strncmp (const char *__s1, const char *__s2, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +@@ -243,6 +267,9 @@ _GL_EXTERN_C void *memrchr (const void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C void *memset (void *__s, int __c, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + _GL_EXTERN_C void *memset_explicit (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); +diff --git a/lib/wchar.in.h b/lib/wchar.in.h +index 8836ed1..a6c52eb 100644 +--- a/lib/wchar.in.h ++++ b/lib/wchar.in.h +@@ -281,20 +281,38 @@ _GL_EXTERN_C void free (void *); + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ + _GL_EXTERN_C wchar_t *wmemcpy (wchar_t *__dest, const wchar_t *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C wchar_t *wmemmove (wchar_t *__dest, const wchar_t *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C wchar_t *wcsncpy (wchar_t *__dest, const wchar_t *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C wchar_t *wcsncat (wchar_t *__dest, const wchar_t *__src, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C int wmemcmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +@@ -302,6 +320,9 @@ _GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++ _GL_ATTRIBUTE_NOTHROW ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + #endif + diff --git a/meta/recipes-devtools/m4/m4/0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch b/meta/recipes-devtools/m4/m4/0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch new file mode 100644 index 0000000000..ef7117997b --- /dev/null +++ b/meta/recipes-devtools/m4/m4/0002-string-h-Fix-compilation-error-on-macOS-with-fortify.patch @@ -0,0 +1,126 @@ +From 84b6bcb2c691796d87b47bfcf815409ca2b9e461 Mon Sep 17 00:00:00 2001 +From: Bruno Haible +Date: Thu, 10 Jul 2025 11:04:50 +0200 +Subject: [PATCH] string-h: Fix compilation error on macOS with fortify. + +Reported by Pierre Ossman at +. + +* lib/string.in.h (memcpy etc.): Don't redeclare functions that are +declared as macros. + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=c44fe03b72687c9e913727724c29bdb49c1f86e3] +Signed-off-by: Martin Jansa +--- + lib/string.in.h | 58 +++++++++++++++++++++++++++++++++---------------- + 1 file changed, 39 insertions(+), 19 deletions(-) + +diff --git a/lib/string.in.h b/lib/string.in.h +index e3d94b7..9a039c7 100644 +--- a/lib/string.in.h ++++ b/lib/string.in.h +@@ -214,65 +214,85 @@ _GL_EXTERN_C void free (void *); + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ ++# ifndef memcpy + _GL_EXTERN_C void *memcpy (void *__dest, const void *__src, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef memccpy + _GL_EXTERN_C void *memccpy (void *__dest, const void *__src, int __c, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 4) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 4); ++# endif ++# ifndef memmove + _GL_EXTERN_C void *memmove (void *__dest, const void *__src, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef strncpy + _GL_EXTERN_C char *strncpy (char *__dest, const char *__src, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef strndup + _GL_EXTERN_C char *strndup (const char *__s, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 2); ++# endif ++# ifndef strncat + _GL_EXTERN_C char *strncat (char *__dest, const char *__src, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ARG_NONNULL ((1)) _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef memcmp + _GL_EXTERN_C int memcmp (const void *__s1, const void *__s2, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); ++# endif ++# ifndef strncmp + _GL_EXTERN_C int strncmp (const char *__s1, const char *__s2, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); +-# ifndef __cplusplus ++# endif ++# if !defined memchr && !defined __cplusplus + _GL_EXTERN_C void *memchr (const void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + _GL_EXTERN_C void *memrchr (const void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif ++# ifndef memset + _GL_EXTERN_C void *memset (void *__s, int __c, size_t __n) +-# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 ++# if __GLIBC__ + (__GLIBC_MINOR__ >= 2) > 2 + _GL_ATTRIBUTE_NOTHROW +-# endif ++# endif + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); ++# endif ++# ifndef memset_explicit + _GL_EXTERN_C void *memset_explicit (void *__s, int __c, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); ++# endif + #endif + + diff --git a/meta/recipes-devtools/m4/m4/0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch b/meta/recipes-devtools/m4/m4/0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch new file mode 100644 index 0000000000..7d88e45fa5 --- /dev/null +++ b/meta/recipes-devtools/m4/m4/0003-Port-to-C23-qualifier-generic-fns-like-strchr.patch @@ -0,0 +1,194 @@ +From 100cbc40da39dcdf259ebce2bd0f2b4889cf2204 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sun, 23 Nov 2025 00:50:40 -0800 +Subject: [PATCH] Port to C23 qualifier-generic fns like strchr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This ports Gnulib to strict C23 platforms that reject code +like ‘char *q = strchr (P, 'x');’ when P is a pointer to const, +because in C23 strchr is a qualifier-generic function so +strchr (P, 'x') returns char const *. +This patch does not attempt to do the following two things, +which might be useful in the future: +1. When compiling on non-C23 platforms, check user code for +portability to platforms that define qualifier-generic functions. +2. Port Gnulib to platforms that have qualifier-generic functions +not listed in the C23 standard, e.g., strchrnul. I don’t know +of any such platforms. +* lib/argp-help.c (argp_doc): +* lib/c-strstr.c (c_strstr): +* lib/dfa.c (comsubs): +* lib/mbschr.c (mbschr): +* lib/mbspbrk.c (mbspbrk): +* lib/mbsrchr.c (mbsrchr): +* lib/memchr2.c (memchr2): +* lib/string-desc.c (_sd_index): +* tests/test-bsearch.c (lib_bsearch): +* tests/test-memchr.c (lib_memchr): +* tests/test-wmemchr.c (lib_wmemchr): +Port to C23, where functions like strchr are qualifier-generic. +* lib/c++defs.h (_GL_FUNCDECL_SYS_NAME): New macro. +* lib/c++defs.h (_GL_FUNCDECL_SYS): +* lib/stdlib.in.h (bsearch): +Use it, to prevent C23 names like strchr from acting like macros. +* lib/string.in.h (memchr, strchr, strpbrk, strrchr): +Do not #undef when GNULIB_POSIXCHECK is defined, as this could +cause conforming C23 code to fail to conform. It’s not clear why +_GL_WARN_ON_USE_CXX; perhaps it was needed but isn’t any more? +But for now, limit the removal of #undef to these four functions +where #undeffing is clearly undesirable in C23. +* lib/wchar.in.h (wmemchr): Parenthesize function name in decl, +to prevent it from acting like a macro. + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=df17f4f37ed3ca373d23ad42eae51122bdb96626] +Signed-off-by: Martin Jansa +--- + lib/c++defs.h | 12 +++++++++++- + lib/memchr2.c | 2 +- + lib/stdlib.in.h | 6 +++--- + lib/string.in.h | 4 ---- + lib/wchar.in.h | 2 +- + tests/c++defs.h | 12 +++++++++++- + 6 files changed, 27 insertions(+), 11 deletions(-) + +diff --git a/lib/c++defs.h b/lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/lib/c++defs.h ++++ b/lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/lib/memchr2.c b/lib/memchr2.c +index 7493823..d7724ae 100644 +--- a/lib/memchr2.c ++++ b/lib/memchr2.c +@@ -55,7 +55,7 @@ memchr2 (void const *s, int c1_in, int c2_in, size_t n) + c2 = (unsigned char) c2_in; + + if (c1 == c2) +- return memchr (s, c1, n); ++ return (void *) memchr (s, c1, n); + + /* Handle the first few bytes by reading one byte at a time. + Do this until VOID_PTR is aligned on a longword boundary. */ +diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/lib/stdlib.in.h ++++ b/lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/lib/string.in.h b/lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/lib/string.in.h ++++ b/lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/lib/wchar.in.h b/lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/lib/wchar.in.h ++++ b/lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/tests/c++defs.h b/tests/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/tests/c++defs.h ++++ b/tests/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func From patchwork Mon Mar 30 15:16:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 84852 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EA171061B0E for ; Mon, 30 Mar 2026 15:16:42 +0000 (UTC) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.54088.1774883791980280653 for ; Mon, 30 Mar 2026 08:16:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=A8vLapEF; spf=pass (domain: gmail.com, ip: 209.85.221.48, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-43b87970468so4200830f8f.3 for ; Mon, 30 Mar 2026 08:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774883790; x=1775488590; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TlHn83iwvUkVFVK/6fbYCO3lVqeK3DbRFxJzWNIqc64=; b=A8vLapEF/Kzxohb7lVicLNSdyRa1/1BV7PuJAxA6j2D6QJ5UDZfMDzqMl0hKEVJI7K bNtXyJtrp5VrfPb2PnwJ0sb+MpRMjnU/EEO7zhqUiBzH4QMQA7HqvXI6VPQsdupvRq5T 4bAyuMXt/Q9N4msHIzk0/S7nyI0RinmkwFGEKjjfSBb0HeLpAIVeSaXcZtDM0NQTmQkR SWXAhZ2TJ5fbd9kqgpevyoQcb7rA1M8mw2LQ9wojLlN/nCVEt80gsVvG4Ihqp6VT5RxB HYEBn465lVyoiiCSfvL6JYzhQF9HFgdAllAIa/pcf4rsHqfLh4h4gBEhgmcyHleIFLPh la5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774883790; x=1775488590; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TlHn83iwvUkVFVK/6fbYCO3lVqeK3DbRFxJzWNIqc64=; b=bDZ3YrCqiWtjPSnfucrbJJmwAhW6nfTYfjgwSEarHvxMVgW8BgZUsGetA0n4+ytS9I TtSSZ2mXGyK6OQcoXjIgz740XkOA7fwO/J5PX3+w5Aaqgcz7DeJ+t6g7l2mKgdFd3e3N t/wI0hIQs4MpOM6D9jNQqPYR0SNAP7ricbru9iN1ia+IMESivXAVzXHN0J1zzbWRGxbn 2ObeNfEZJjiIxwCUQTI3o+LRELoUqB6p2pUa23LUO6izuyyRs+BONWY9pFoMK6wJ24bN uvKbE3qFGEZIz5EDvtmp2S/fodjRPw6xahzYcRb2IS9frxM2WOZ1HIyWZBmhmSf03vMq 8iHw== X-Gm-Message-State: AOJu0YzB1V3IXn5bSm6niZWkT1LOjLyiJHrdNioFOABi6xDqtNFLppZ2 Vf5qoWmUMPxCdxvhvCohXYZaV2Dooxq3IHHZwznWd77feZsRgcgR7xDpLfAyAA== X-Gm-Gg: ATEYQzwRBpOMgG2BOy+dTOyXhWjgxdgXA28N1OWox2tx2iWewvJjsgmw9zlVJp2BCN2 BlJAju9GEY8GvPRrFPbMh1X1Z8+8uVJVlFD/ugVqea9VEYroGeZdFJsLoyxJa2+s8P260lGjkRx cUfYMijmkTBFCrELJLRds02H4m3V3yMhFQaTlX9rYsLD9h8l8GVYx5roSTiSxuEiKpwxQrqqyav 2ARvkbs1tiirnf+UmbxIx7wPG6jHgk8WhqbYTLDkgDIxCY+HF9hkz2pq2lz/WBHvh7dRAx24ODO 7L9BkLiL+q1DjzYLdiHyb1nfXtmaxyGJjySnYFrZOB5weyLjbdlSVrXCY9cA5Ubu+CVfR5Oh1zq Lhctv1lgLZVlsvDCzVKS5601vMmmkzrlv/5zCzyOqpLdaiCTyRW62pbKUABldRwd4JD+jiFfcCk ne+D0lnp2OQiYbf2TaOWjw3CZ3hA== X-Received: by 2002:a05:6000:1847:b0:43c:fd0a:5c6b with SMTP id ffacd0b85a97d-43cfd0a5f41mr9406970f8f.50.1774883789926; Mon, 30 Mar 2026 08:16:29 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43cf245f8a3sm21061565f8f.24.2026.03.30.08.16.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 08:16:29 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa Subject: [whinlatter][PATCH 5/7] gettext: backport gnulib changes to fix build with glibc-2.43 on host Date: Mon, 30 Mar 2026 17:16:14 +0200 Message-ID: <20260330151620.3835312-5-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330151620.3835312-1-martin.jansa@gmail.com> References: <20260330151620.3835312-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 30 Mar 2026 15:16:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234246 From: Martin Jansa It's already included in gettext-1.0 used in master. Unfortunately this need to be applied in 6 different copies of gnulib inside gettext repo. Signed-off-by: Martin Jansa --- ...23-qualifier-generic-fns-like-strchr.patch | 626 ++++++++++++++++++ meta/recipes-core/gettext/gettext_0.26.bb | 1 + 2 files changed, 627 insertions(+) create mode 100644 meta/recipes-core/gettext/gettext/0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch diff --git a/meta/recipes-core/gettext/gettext/0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch b/meta/recipes-core/gettext/gettext/0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch new file mode 100644 index 0000000000..634e17ea78 --- /dev/null +++ b/meta/recipes-core/gettext/gettext/0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch @@ -0,0 +1,626 @@ +From 64c9525e8664ec3b89475100cbeda06ed916e707 Mon Sep 17 00:00:00 2001 +From: Paul Eggert +Date: Sun, 23 Nov 2025 00:50:40 -0800 +Subject: [PATCH] Port to C23 qualifier-generic fns like strchr +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This ports Gnulib to strict C23 platforms that reject code +like ‘char *q = strchr (P, 'x');’ when P is a pointer to const, +because in C23 strchr is a qualifier-generic function so +strchr (P, 'x') returns char const *. +This patch does not attempt to do the following two things, +which might be useful in the future: +1. When compiling on non-C23 platforms, check user code for +portability to platforms that define qualifier-generic functions. +2. Port Gnulib to platforms that have qualifier-generic functions +not listed in the C23 standard, e.g., strchrnul. I don’t know +of any such platforms. +* lib/argp-help.c (argp_doc): +* lib/c-strstr.c (c_strstr): +* lib/dfa.c (comsubs): +* lib/mbschr.c (mbschr): +* lib/mbspbrk.c (mbspbrk): +* lib/mbsrchr.c (mbsrchr): +* lib/memchr2.c (memchr2): +* lib/string-desc.c (_sd_index): +* tests/test-bsearch.c (lib_bsearch): +* tests/test-memchr.c (lib_memchr): +* tests/test-wmemchr.c (lib_wmemchr): +Port to C23, where functions like strchr are qualifier-generic. +* lib/c++defs.h (_GL_FUNCDECL_SYS_NAME): New macro. +* lib/c++defs.h (_GL_FUNCDECL_SYS): +* lib/stdlib.in.h (bsearch): +Use it, to prevent C23 names like strchr from acting like macros. +* lib/string.in.h (memchr, strchr, strpbrk, strrchr): +Do not #undef when GNULIB_POSIXCHECK is defined, as this could +cause conforming C23 code to fail to conform. It’s not clear why +_GL_WARN_ON_USE_CXX; perhaps it was needed but isn’t any more? +But for now, limit the removal of #undef to these four functions +where #undeffing is clearly undesirable in C23. +* lib/wchar.in.h (wmemchr): Parenthesize function name in decl, +to prevent it from acting like a macro. + +Upstream-Status: Backport [https://cgit.git.savannah.gnu.org/cgit/gnulib.git/commit/?id=df17f4f37ed3ca373d23ad42eae51122bdb96626] +Signed-off-by: Martin Jansa +--- + gettext-runtime/gnulib-lib/c++defs.h | 12 +++++++++++- + gettext-runtime/gnulib-lib/stdlib.in.h | 6 +++--- + gettext-runtime/gnulib-lib/string.in.h | 4 ---- + gettext-runtime/gnulib-lib/wchar.in.h | 2 +- + gettext-runtime/intl/gnulib-lib/c++defs.h | 12 +++++++++++- + gettext-runtime/intl/gnulib-lib/stdlib.in.h | 6 +++--- + gettext-runtime/intl/gnulib-lib/string.in.h | 4 ---- + gettext-runtime/intl/gnulib-lib/wchar.in.h | 2 +- + gettext-tools/gnulib-lib/c++defs.h | 12 +++++++++++- + gettext-tools/gnulib-lib/stdlib.in.h | 6 +++--- + gettext-tools/gnulib-lib/string.in.h | 4 ---- + gettext-tools/gnulib-lib/wchar.in.h | 2 +- + gettext-tools/libgettextpo/c++defs.h | 12 +++++++++++- + gettext-tools/libgettextpo/stdlib.in.h | 6 +++--- + gettext-tools/libgettextpo/string.in.h | 4 ---- + gettext-tools/libgettextpo/wchar.in.h | 2 +- + gettext-tools/libgrep/gnulib-lib/c++defs.h | 12 +++++++++++- + gettext-tools/libgrep/gnulib-lib/memchr2.c | 2 +- + gettext-tools/libgrep/gnulib-lib/stdlib.in.h | 6 +++--- + gettext-tools/libgrep/gnulib-lib/wchar.in.h | 2 +- + libtextstyle/lib/c++defs.h | 12 +++++++++++- + libtextstyle/lib/stdlib.in.h | 6 +++--- + libtextstyle/lib/string.in.h | 4 ---- + libtextstyle/lib/wchar.in.h | 2 +- + 24 files changed, 91 insertions(+), 51 deletions(-) + +diff --git a/gettext-runtime/gnulib-lib/c++defs.h b/gettext-runtime/gnulib-lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-runtime/gnulib-lib/c++defs.h ++++ b/gettext-runtime/gnulib-lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-runtime/gnulib-lib/stdlib.in.h b/gettext-runtime/gnulib-lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-runtime/gnulib-lib/stdlib.in.h ++++ b/gettext-runtime/gnulib-lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-runtime/gnulib-lib/string.in.h b/gettext-runtime/gnulib-lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/gettext-runtime/gnulib-lib/string.in.h ++++ b/gettext-runtime/gnulib-lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/gettext-runtime/gnulib-lib/wchar.in.h b/gettext-runtime/gnulib-lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-runtime/gnulib-lib/wchar.in.h ++++ b/gettext-runtime/gnulib-lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/gettext-runtime/intl/gnulib-lib/c++defs.h b/gettext-runtime/intl/gnulib-lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-runtime/intl/gnulib-lib/c++defs.h ++++ b/gettext-runtime/intl/gnulib-lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-runtime/intl/gnulib-lib/stdlib.in.h b/gettext-runtime/intl/gnulib-lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-runtime/intl/gnulib-lib/stdlib.in.h ++++ b/gettext-runtime/intl/gnulib-lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-runtime/intl/gnulib-lib/string.in.h b/gettext-runtime/intl/gnulib-lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/gettext-runtime/intl/gnulib-lib/string.in.h ++++ b/gettext-runtime/intl/gnulib-lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/gettext-runtime/intl/gnulib-lib/wchar.in.h b/gettext-runtime/intl/gnulib-lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-runtime/intl/gnulib-lib/wchar.in.h ++++ b/gettext-runtime/intl/gnulib-lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/gettext-tools/gnulib-lib/c++defs.h b/gettext-tools/gnulib-lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-tools/gnulib-lib/c++defs.h ++++ b/gettext-tools/gnulib-lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-tools/gnulib-lib/stdlib.in.h b/gettext-tools/gnulib-lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-tools/gnulib-lib/stdlib.in.h ++++ b/gettext-tools/gnulib-lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-tools/gnulib-lib/string.in.h b/gettext-tools/gnulib-lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/gettext-tools/gnulib-lib/string.in.h ++++ b/gettext-tools/gnulib-lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/gettext-tools/gnulib-lib/wchar.in.h b/gettext-tools/gnulib-lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-tools/gnulib-lib/wchar.in.h ++++ b/gettext-tools/gnulib-lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/gettext-tools/libgettextpo/c++defs.h b/gettext-tools/libgettextpo/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-tools/libgettextpo/c++defs.h ++++ b/gettext-tools/libgettextpo/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-tools/libgettextpo/stdlib.in.h b/gettext-tools/libgettextpo/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-tools/libgettextpo/stdlib.in.h ++++ b/gettext-tools/libgettextpo/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-tools/libgettextpo/string.in.h b/gettext-tools/libgettextpo/string.in.h +index 9a039c7..bc44f81 100644 +--- a/gettext-tools/libgettextpo/string.in.h ++++ b/gettext-tools/libgettextpo/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/gettext-tools/libgettextpo/wchar.in.h b/gettext-tools/libgettextpo/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-tools/libgettextpo/wchar.in.h ++++ b/gettext-tools/libgettextpo/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/gettext-tools/libgrep/gnulib-lib/c++defs.h b/gettext-tools/libgrep/gnulib-lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/gettext-tools/libgrep/gnulib-lib/c++defs.h ++++ b/gettext-tools/libgrep/gnulib-lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/gettext-tools/libgrep/gnulib-lib/memchr2.c b/gettext-tools/libgrep/gnulib-lib/memchr2.c +index 7493823..d7724ae 100644 +--- a/gettext-tools/libgrep/gnulib-lib/memchr2.c ++++ b/gettext-tools/libgrep/gnulib-lib/memchr2.c +@@ -55,7 +55,7 @@ memchr2 (void const *s, int c1_in, int c2_in, size_t n) + c2 = (unsigned char) c2_in; + + if (c1 == c2) +- return memchr (s, c1, n); ++ return (void *) memchr (s, c1, n); + + /* Handle the first few bytes by reading one byte at a time. + Do this until VOID_PTR is aligned on a longword boundary. */ +diff --git a/gettext-tools/libgrep/gnulib-lib/stdlib.in.h b/gettext-tools/libgrep/gnulib-lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/gettext-tools/libgrep/gnulib-lib/stdlib.in.h ++++ b/gettext-tools/libgrep/gnulib-lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/gettext-tools/libgrep/gnulib-lib/wchar.in.h b/gettext-tools/libgrep/gnulib-lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/gettext-tools/libgrep/gnulib-lib/wchar.in.h ++++ b/gettext-tools/libgrep/gnulib-lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) +diff --git a/libtextstyle/lib/c++defs.h b/libtextstyle/lib/c++defs.h +index df98a5a..d3dfabd 100644 +--- a/libtextstyle/lib/c++defs.h ++++ b/libtextstyle/lib/c++defs.h +@@ -127,6 +127,16 @@ + #define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \ + _GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters + ++/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to ++ parenthsized func otherwise. Parenthesization is needed in C23 if ++ the function is like strchr and so is a qualifier-generic macro ++ that expands to something more complicated. */ ++#ifdef __cplusplus ++# define _GL_FUNCDECL_SYS_NAME(func) func ++#else ++# define _GL_FUNCDECL_SYS_NAME(func) (func) ++#endif ++ + /* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]); + declares the system function, named func, with the given prototype, + consisting of return type, parameters, and attributes. +@@ -139,7 +149,7 @@ + _GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD); + */ + #define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \ +- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters ++ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters + + /* _GL_CXXALIAS_RPL (func, rettype, parameters); + declares a C++ alias called GNULIB_NAMESPACE::func +diff --git a/libtextstyle/lib/stdlib.in.h b/libtextstyle/lib/stdlib.in.h +index 1342db4..3548d6e 100644 +--- a/libtextstyle/lib/stdlib.in.h ++++ b/libtextstyle/lib/stdlib.in.h +@@ -237,9 +237,9 @@ _GL_INLINE_HEADER_BEGIN + + /* Declarations for ISO C N3322. */ + #if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__ +-_GL_EXTERN_C void *bsearch (const void *__key, +- const void *__base, size_t __nmemb, size_t __size, +- int (*__compare) (const void *, const void *)) ++_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch) ++ (const void *__key, const void *__base, size_t __nmemb, size_t __size, ++ int (*__compare) (const void *, const void *)) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5)); + _GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size, + int (*__compare) (const void *, const void *)) +diff --git a/libtextstyle/lib/string.in.h b/libtextstyle/lib/string.in.h +index 9a039c7..bc44f81 100644 +--- a/libtextstyle/lib/string.in.h ++++ b/libtextstyle/lib/string.in.h +@@ -403,7 +403,6 @@ _GL_CXXALIASWARN1 (memchr, void const *, + _GL_CXXALIASWARN (memchr); + # endif + #elif defined GNULIB_POSIXCHECK +-# undef memchr + /* Assume memchr is always declared. */ + _GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " + "use gnulib module memchr for portability" ); +@@ -653,7 +652,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " + #if defined GNULIB_POSIXCHECK + /* strchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strchr + /* Assume strchr is always declared. */ + _GL_WARN_ON_USE_CXX (strchr, + const char *, char *, (const char *, int), +@@ -945,7 +943,6 @@ _GL_CXXALIASWARN (strpbrk); + Even in this simple case, it does not work with multibyte strings if the + locale encoding is GB18030 and one of the characters to be searched is a + digit. */ +-# undef strpbrk + _GL_WARN_ON_USE_CXX (strpbrk, + const char *, char *, (const char *, const char *), + "strpbrk cannot work correctly on character strings " +@@ -975,7 +972,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " + #if defined GNULIB_POSIXCHECK + /* strrchr() does not work with multibyte strings if the locale encoding is + GB18030 and the character to be searched is a digit. */ +-# undef strrchr + /* Assume strrchr is always declared. */ + _GL_WARN_ON_USE_CXX (strrchr, + const char *, char *, (const char *, int), +diff --git a/libtextstyle/lib/wchar.in.h b/libtextstyle/lib/wchar.in.h +index a6c52eb..b4de385 100644 +--- a/libtextstyle/lib/wchar.in.h ++++ b/libtextstyle/lib/wchar.in.h +@@ -316,7 +316,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3); + # ifndef __cplusplus +-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n) ++_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n) + _GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3); + # endif + _GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n) diff --git a/meta/recipes-core/gettext/gettext_0.26.bb b/meta/recipes-core/gettext/gettext_0.26.bb index b99b301af4..bb73015449 100644 --- a/meta/recipes-core/gettext/gettext_0.26.bb +++ b/meta/recipes-core/gettext/gettext_0.26.bb @@ -26,6 +26,7 @@ SRC_URI += " \ file://serial-tests-config.patch \ file://0001-tests-autopoint-3-unset-MAKEFLAGS.patch \ file://0001-init-env.in-do-not-add-C-CXX-parameters.patch \ + file://0001-Port-to-C23-qualifier-generic-fns-like-strchr.patch \ " SRC_URI:append:libc-musl = " file://0001-Ignore-failing-tests-needing-BIG5-encoding-on-musl.patch" From patchwork Mon Mar 30 15:16:15 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 84853 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5F8511061B13 for ; Mon, 30 Mar 2026 15:16:42 +0000 (UTC) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.53847.1774883792591825702 for ; Mon, 30 Mar 2026 08:16:32 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=K9WEw4D0; spf=pass (domain: gmail.com, ip: 209.85.221.47, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-43b9d3ebed5so3242257f8f.1 for ; Mon, 30 Mar 2026 08:16:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774883791; x=1775488591; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YCXIkJbDCgDTJxFWdRmzTui09o8vqsTX7yMXYfLflVU=; b=K9WEw4D0aAl1O80pbqiDtQSUOo6AuKmNKE+nbaxVKtafMYqmwBCvPxoPJkjBUUs42G RLIHPeUPqL2ahQY/QVq4HSSaLzZsHvQeNq9aL31g9F8EDDxYHKYS/7yXI4Amth6BevNe i6ImBFkkuJAfy4RR0fi47UokCWOTq8F8qR3E++0O3khTxC3e3r4XBQacU07kbKz6Yfnd P8yX30tV9hZ5A4sE8zLf9q0y26AF8zAdvRt8kdlXpxMVCYU5JdZXEDff6a3Y2xFwICR1 G5C+uDNqlso/5CjHOWKBABnoKeE/iH2afSX7yUvn8OWCpw9IsSGfwgL+m1EbtFrv2vG1 Rn2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774883791; x=1775488591; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=YCXIkJbDCgDTJxFWdRmzTui09o8vqsTX7yMXYfLflVU=; b=CeGcrgcenBV3ZzKHAgh3/zPdHXKTOofwypupkS43/XOfKKfHbIxb/3QkUQDjFbBDNf r9V2npjPz0FIjYsXwKtszljnDzYz0lZIvGq1Ze/6bvpYnH1UsMesdhSgmPxr9rFsBXfu uWWwbORX5M7rtjGrNS6BGVsSknRlKcH3M1gTWYEgToSA5r2OwSIIrq+qYsqWeYXpfCc6 QCGD2ubiX8IiHXN1n4Jb8Ve8hDCVZzJLhj8IQJZR2+Kkq/OMbLKiC5U6x34ziqZr7PCY vc7u9AiUZU60QNbFH1wad7C94IqyR7d0klJTun7N7ajJR1+HkWBRG9kj7eWCYEVnZTy6 q4ww== X-Gm-Message-State: AOJu0YwywIx/hqiG23nRFLY7ugxfyOKXwrOhGE+RWIYbeL3RCXmf9Yr1 QcL6yM6m3uQphPxEQiTF3GaCUpF5cv23L9/K2r4CnVRe3xeyk1ZyOL5047YKXw== X-Gm-Gg: ATEYQzz+Zjo3Z1LwQ1r+8MvUZBLdrA5iH6NO3klLcG6TRh9UQY6kR7pc3Umj+0ivADW Xr48MHZ6LnhW3v7MsZigzWJUUGAW/dA4YTSG93N//h4/ZvfEM4PtmEx5hAq2Rjm5zn5PDDKsMkp Wxu/3Si/XNB62mnxR23m1ldrheuDhPkg/2mSR+iEyD6NyN4m5QIs+AizJplF3+4usVQGLHoGBSy fN0d/S3Z4qQp3KpTqzzAtN+GJzwEeq066BRlMpADS6W2L0F7orTrtncfUmH47fVhFUkDRGUcNzG iQ8tEQGcv2OQcf/g2wKYuZNyW38BiSWhbpnNR7ZGpiT6VJXi20HjXRuuF4iTuHhheZNnTbnGHny lUmvRk92oP+NxcsE+29ufFfE+Tt/feoMVZmhOsH7ierHjRGkCIOxU0cnRIZZMoR9cm3lOTd92/z sXkKGY1d1/gfaqzwApRh0Ghg2AqoTc6BYa1iEQ X-Received: by 2002:a05:600c:4f53:b0:487:18c:7acf with SMTP id 5b1f17b1804b1-48727edfcacmr215564135e9.25.1774883790779; Mon, 30 Mar 2026 08:16:30 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4873069961esm192068455e9.12.2026.03.30.08.16.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 08:16:30 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa Subject: [whinlatter][PATCH 6/7] util-linux: backport fix to build with glibc-2.43 on host Date: Mon, 30 Mar 2026 17:16:15 +0200 Message-ID: <20260330151620.3835312-6-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330151620.3835312-1-martin.jansa@gmail.com> References: <20260330151620.3835312-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 30 Mar 2026 15:16:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234247 From: Martin Jansa Signed-off-by: Martin Jansa --- meta/recipes-core/util-linux/util-linux.inc | 1 + ...x-bsearch-macro-usage-with-glibc-C23.patch | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch diff --git a/meta/recipes-core/util-linux/util-linux.inc b/meta/recipes-core/util-linux/util-linux.inc index 3135bbb7c6..3bcf681f24 100644 --- a/meta/recipes-core/util-linux/util-linux.inc +++ b/meta/recipes-core/util-linux/util-linux.inc @@ -21,6 +21,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin file://0001-ts-kill-decode-use-RTMIN-from-kill-L-instead-of-hard.patch \ file://0001-tests-helpers-test_sigstate.c-explicitly-reset-SIGIN.patch \ file://0001-include-mount-api-utils-avoid-using-sys-mount.h.patch \ + file://0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch \ file://CVE-2025-14104-01.patch \ file://CVE-2025-14104-02.patch \ " diff --git a/meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch b/meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch new file mode 100644 index 0000000000..6194594f7f --- /dev/null +++ b/meta/recipes-core/util-linux/util-linux/0001-lsfd-fix-bsearch-macro-usage-with-glibc-C23.patch @@ -0,0 +1,40 @@ +From 710a6989e0fc6dfc9290e2639022d1dbf429557f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Cristian=20Rodr=C3=ADguez?= +Date: Sat, 22 Nov 2025 10:41:08 -0300 +Subject: [PATCH] lsfd: fix bsearch macro usage with glibc C23 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +C23 requires bsearch to be a const preserving macro, build now fails +with + +../lsfd-cmd/lsfd.c:1879:75: error: macro ‘bsearch’ passed 6 arguments, but takes just 5 + 1879 | nfds, sizeof(struct pollfd), pollfdcmp)) + | ^ +In file included from ../include/c.h:17, + from ../lsfd-cmd/lsfd.c:48: +/usr/include/stdlib.h:987:10: note: macro ‘bsearch’ defined here + 987 | # define bsearch(KEY, BASE, NMEMB, SIZE, COMPAR) \ + + add parenthesis around expression to fix it. + +Upstream-Status: Backport [2.42 https://github.com/util-linux/util-linux/commit/711bda1441561bfd2eb6d45fe0bc789535c1f1a8] +Signed-off-by: Martin Jansa +--- + lsfd-cmd/lsfd.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lsfd-cmd/lsfd.c b/lsfd-cmd/lsfd.c +index 75cd1de..9aae240 100644 +--- a/lsfd-cmd/lsfd.c ++++ b/lsfd-cmd/lsfd.c +@@ -1836,7 +1836,7 @@ static void mark_poll_fds_as_multiplexed(char *buf, + struct file *file = list_entry(f, struct file, files); + if (is_opened_file(file) && !file->multiplexed) { + int fd = file->association; +- if (bsearch(&(struct pollfd){.fd = fd,}, local.iov_base, ++ if (bsearch((&(struct pollfd){.fd = fd,}), local.iov_base, + nfds, sizeof(struct pollfd), pollfdcmp)) + file->multiplexed = 1; + } From patchwork Mon Mar 30 15:16:16 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Martin Jansa X-Patchwork-Id: 84851 X-Patchwork-Delegate: yoann.congal@smile.fr Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2230A1061B0F for ; Mon, 30 Mar 2026 15:16:42 +0000 (UTC) Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.54089.1774883793410862165 for ; Mon, 30 Mar 2026 08:16:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20251104 header.b=hr7UAE9C; spf=pass (domain: gmail.com, ip: 209.85.221.42, mailfrom: martin.jansa@gmail.com) Received: by mail-wr1-f42.google.com with SMTP id ffacd0b85a97d-43d01d6b50cso716114f8f.1 for ; Mon, 30 Mar 2026 08:16:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774883792; x=1775488592; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QVX0cNGJ247dfID8rDSwVYiCJfnPgyFMyJZX0EgNT5I=; b=hr7UAE9CsIDlC8wIz8X33BNcnnT4i/Y7Ws+LtvyVeYNGaffG8+fPDMehPSDRkFrtnJ atUwBME06hCFsNctLfLZCD2uco6nXX/HCxqcBp31TFJEyj9YXzAnVYKEKtUOjKLhbZSr qzI5NzCmBsDHK7U4rmSIo4myeiipf3X/DnsoNB5KtSFUfsACIHLh3i5wp1zNbn3gGlkJ AH5LzGdLjHzzDIXvzIxOMxLxlEF+vmxQoYNIrQXsv3GT3J4CnZkk1PdoGwNnsar2pZ1X JTh2b8k7bsQSLRUcqS7H+rCycKsrNuyWl+a7+fnzl/0nhEpUIYsyzaub45nKyyhj6hg7 81UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774883792; x=1775488592; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QVX0cNGJ247dfID8rDSwVYiCJfnPgyFMyJZX0EgNT5I=; b=fW0Cq9klJM82Y5RRVqnZhuHEb2Nd2ShAuT48wAN+Jq+lHSgfjNJhbx6AH+nEfK4yzq Gn3i8Pb353UulwMggFHISxmcakJzDSRL9+38Ji85BEtAunHpjteO/WXB/BGEAnGx5i4Y 6Iv7gsQGGbgJavjAJY8EcNfIhplady/t9ZbwqXmy8b2y5fww+ESHYb+CGnjEgd5VjU1f vQnby3r7eh6Trx/LiokckADbeRQRB+R5Ox+OecgrZkciAp5GWYGR7ozzaDj0pmn8bbhB vjctbzFFICmVdla5cV1doI6cNqeOTm4zY0q9/cXxKvB+PrQKMVgIf2N+j640CLB4uwCo nR+g== X-Gm-Message-State: AOJu0YxRJfx7pey/5EJXdTQPEb6e+vaP3gxkoGIvZawLNpebsL27LfuB XZkqHy0Y4zdZT/yk7DRe4zL9iS0fSzOUtsfrQsfqykm9qgM0Oh24EY3dYHKepw== X-Gm-Gg: ATEYQzx7Q0TUd5Yq6RXYFViuHa+nSzLurxcqBIP/9KkWcRCCnG4YxccHBiNseyRPnbv 6eE+66D6SYAT6CzhiSsSjk7l6epZISo2ib3foX1DxX+7Z7lHUH3jeHol1Gpl1Mt2dj2YPvA0yQS V7kxSNPR4OPoL8t33KetAp3G8EoZaHxkrynpipX++j/Dnf1BSF+wHEcwPIy/KlC3hNRGPs/Upob hj4YkuBPIf7q2YZAx0Hcs5Y4zxy3Ihfz03WS++Bw4IID2yoIFmz4cTUARpO+B3ylbdKz7wVwoQp ZJoQ0nke38xJc6bkPaOjzS7P9DMwNF5CYRSUg46fswlJWJKJ7EoNdYMT4tRjc8v6MuyJ7fWgpHv fUkTlbO+OTHeJY8gXCIZo3+ftOXGr52p16lsukip30aBFPaOZXhHTPx/L+Sygx4AmI3BSQriv5Z GT0qoN9vVY/su0+gdLp1+f/Y/1EQ== X-Received: by 2002:a05:6000:40dd:b0:43b:5192:894b with SMTP id ffacd0b85a97d-43b9e9faf4dmr21510102f8f.23.1774883791669; Mon, 30 Mar 2026 08:16:31 -0700 (PDT) Received: from localhost ([109.238.218.228]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-43cf21e2727sm21661575f8f.2.2026.03.30.08.16.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Mar 2026 08:16:31 -0700 (PDT) From: martin.jansa@gmail.com To: openembedded-core@lists.openembedded.org Cc: Martin Jansa Subject: [whinlatter][PATCH 7/7] systemd: backport fix to build with glibc-2.43 on host Date: Mon, 30 Mar 2026 17:16:16 +0200 Message-ID: <20260330151620.3835312-7-martin.jansa@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260330151620.3835312-1-martin.jansa@gmail.com> References: <20260330151620.3835312-1-martin.jansa@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 30 Mar 2026 15:16:42 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/234248 From: Martin Jansa fixes systemd-systemctl-native on hosts with glibc-2.43: In file included from ../sources/systemd-systemctl-257.9/src/basic/errno-list.c:13: src/basic/errno-to-name.h:71:23: error: initialized field overwritten [-Werror=override-init] 71 | [EFSBADCRC] = "EFSBADCRC", | ^~~~~~~~~~~ src/basic/errno-to-name.h:71:23: note: (near initialization for ?errno_names[74]?) src/basic/errno-to-name.h:114:26: error: initialized field overwritten [-Werror=override-init] 114 | [EFSCORRUPTED] = "EFSCORRUPTED", | ^~~~~~~~~~~~~~ src/basic/errno-to-name.h:114:26: note: (near initialization for ?errno_names[117]?) Signed-off-by: Martin Jansa --- meta/recipes-core/systemd/systemd.inc | 4 ++- ...ilter-out-EFSBADCRC-and-EFSCORRUPTED.patch | 34 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/systemd/systemd/0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch diff --git a/meta/recipes-core/systemd/systemd.inc b/meta/recipes-core/systemd/systemd.inc index 761660f2c8..f41acc029d 100644 --- a/meta/recipes-core/systemd/systemd.inc +++ b/meta/recipes-core/systemd/systemd.inc @@ -17,6 +17,8 @@ LIC_FILES_CHKSUM = "file://LICENSE.GPL2;md5=751419260aa954499f7abaabaa882bbe \ SRCREV = "5e38d199a623563698ab4a69acbbe3afa9135198" SRCBRANCH = "v257-stable" -SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH};tag=v${PV}" +SRC_URI = "git://github.com/systemd/systemd.git;protocol=https;branch=${SRCBRANCH};tag=v${PV} \ + file://0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch \ +" CVE_PRODUCT = "systemd" diff --git a/meta/recipes-core/systemd/systemd/0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch b/meta/recipes-core/systemd/systemd/0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch new file mode 100644 index 0000000000..5673175cb1 --- /dev/null +++ b/meta/recipes-core/systemd/systemd/0001-errno-list-filter-out-EFSBADCRC-and-EFSCORRUPTED.patch @@ -0,0 +1,34 @@ +From fb146f6d2c5118410fd19907651fd8f7310bf69e Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Tue, 24 Feb 2026 20:19:45 +0900 +Subject: [PATCH] errno-list: filter out EFSBADCRC and EFSCORRUPTED + +These are introduced in kernel v7.0. + +Upstream-Status: Backport [https://github.com/systemd/systemd/commit/3cfb16998808a6ec8012a6120d0a82f0e1a0c8bb] +Signed-off-by: Martin Jansa +--- + src/basic/generate-errno-list.sh | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/basic/generate-errno-list.sh b/src/basic/generate-errno-list.sh +index f756b2e020..491fa1b6e3 100755 +--- a/src/basic/generate-errno-list.sh ++++ b/src/basic/generate-errno-list.sh +@@ -3,9 +3,13 @@ + set -eu + set -o pipefail + +-# In kernel's arch/parisc/include/uapi/asm/errno.h, ECANCELLED and EREFUSED are defined as aliases of +-# ECANCELED and ECONNREFUSED, respectively. Let's drop them. ++# In kernel's arch/parisc/include/uapi/asm/errno.h, The following aliases are defined: ++# ECANCELLED → ECANCELED ++# EREFUSED → ECONNREFUSED ++# EFSBADCRC → EBADMSG ++# EFSCORRUPTED → EUCLEAN ++# Let's drop them. + + ${1:?} -dM -include errno.h -